Skip to content

Commit 5783b87

Browse files
committed
Fixed: crash when importing from GnuCash file with budgets
1 parent 032a240 commit 5783b87

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

app/src/main/java/org/gnucash/android/importer/GncXmlHandler.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -555,7 +555,8 @@ public void endElement(String uri, String localName, String qualifiedName) throw
555555
try {
556556
PeriodType periodType = PeriodType.valueOf(characterString.toUpperCase());
557557
periodType.setMultiplier(mRecurrenceMultiplier);
558-
mScheduledAction.setPeriod(periodType);
558+
if (mScheduledAction != null) //there might be recurrence tags for bugdets and other stuff
559+
mScheduledAction.setPeriod(periodType);
559560
} catch (IllegalArgumentException ex){ //the period type constant is not supported
560561
String msg = "Unsupported period constant: " + characterString;
561562
Log.e(LOG_TAG, msg);

0 commit comments

Comments
 (0)