Skip to content

Commit 0d64531

Browse files
fixup! [gncBillTerm.cpp] don't return invalid enum
1 parent c822d84 commit 0d64531

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

libgnucash/engine/gncBillTerm.cpp

+5-1
Original file line numberDiff line numberDiff line change
@@ -538,7 +538,11 @@ const char *gncBillTermGetDescription (const GncBillTerm *term)
538538

539539
GncBillTermType gncBillTermGetType (const GncBillTerm *term)
540540
{
541-
if (!term) return GncBillTermType(0);
541+
if (!term)
542+
{
543+
PERR ("term cannot be null");
544+
return GNC_TERM_TYPE_DAYS;
545+
}
542546
return term->type;
543547
}
544548

0 commit comments

Comments
 (0)