r16393 - gnucash/trunk/src/gnome - Avoid critical warnings when searching interactively in account tree.
Andreas Köhler
andi5 at cvs.gnucash.org
Mon Aug 6 11:40:57 EDT 2007
Author: andi5
Date: 2007-08-06 11:40:55 -0400 (Mon, 06 Aug 2007)
New Revision: 16393
Trac: http://svn.gnucash.org/trac/changeset/16393
Modified:
gnucash/trunk/src/gnome/gnc-plugin-page-account-tree.c
Log:
Avoid critical warnings when searching interactively in account tree.
gnc_account_n_children will print those when it is called with NULL.
Modified: gnucash/trunk/src/gnome/gnc-plugin-page-account-tree.c
===================================================================
--- gnucash/trunk/src/gnome/gnc-plugin-page-account-tree.c 2007-08-06 10:30:08 UTC (rev 16392)
+++ gnucash/trunk/src/gnome/gnc-plugin-page-account-tree.c 2007-08-06 15:40:55 UTC (rev 16393)
@@ -667,7 +667,7 @@
account = gnc_tree_view_account_get_selected_account (GNC_TREE_VIEW_ACCOUNT(view));
sensitive = (account != NULL);
- subaccounts = (gnc_account_n_children(account) != 0);
+ subaccounts = account && (gnc_account_n_children(account) != 0);
/* Check here for placeholder accounts, etc. */
}
More information about the gnucash-changes
mailing list