r16070 - gnucash/trunk/src/app-utils - In gnc_find_or_create_equity_account, fix crash if there is no account "Equity", #436155.

Andreas Köhler andi5 at cvs.gnucash.org
Fri May 11 13:35:02 EDT 2007


Author: andi5
Date: 2007-05-11 13:35:00 -0400 (Fri, 11 May 2007)
New Revision: 16070
Trac: http://svn.gnucash.org/trac/changeset/16070

Modified:
   gnucash/trunk/src/app-utils/gnc-ui-util.c
Log:
In gnc_find_or_create_equity_account, fix crash if there is no account "Equity", #436155.


Modified: gnucash/trunk/src/app-utils/gnc-ui-util.c
===================================================================
--- gnucash/trunk/src/app-utils/gnc-ui-util.c	2007-05-08 22:07:48 UTC (rev 16069)
+++ gnucash/trunk/src/app-utils/gnc-ui-util.c	2007-05-11 17:35:00 UTC (rev 16070)
@@ -639,7 +639,7 @@
   }
 
   parent = gnc_account_lookup_by_name(root, _("Equity"));
-  if (parent && xaccAccountGetType (parent) != ACCT_TYPE_EQUITY)
+  if (!parent || xaccAccountGetType (parent) != ACCT_TYPE_EQUITY)
     parent = root;
   g_assert(parent);
 



More information about the gnucash-changes mailing list