r16392 - gnucash/trunk/src/gnome-utils - Avoid a critical warning when editing an account.
Andreas Köhler
andi5 at cvs.gnucash.org
Mon Aug 6 06:30:10 EDT 2007
Author: andi5
Date: 2007-08-06 06:30:08 -0400 (Mon, 06 Aug 2007)
New Revision: 16392
Trac: http://svn.gnucash.org/trac/changeset/16392
Modified:
gnucash/trunk/src/gnome-utils/dialog-account.c
Log:
Avoid a critical warning when editing an account.
As gnc_account_to_ui is called before a parent account is selected,
get_ui_fullname should not depend on it so that gnc_account_is_root does
not always print a critical warning (GNC_IS_ACCOUNT(account) failed).
Modified: gnucash/trunk/src/gnome-utils/dialog-account.c
===================================================================
--- gnucash/trunk/src/gnome-utils/dialog-account.c 2007-08-05 22:19:09 UTC (rev 16391)
+++ gnucash/trunk/src/gnome-utils/dialog-account.c 2007-08-06 10:30:08 UTC (rev 16392)
@@ -1291,7 +1291,7 @@
parent_account = gnc_tree_view_account_get_selected_account (GNC_TREE_VIEW_ACCOUNT (aw->parent_tree));
- if (!gnc_account_is_root(parent_account))
+ if (parent_account && !gnc_account_is_root(parent_account))
{
char *parent_name;
const gchar *separator;
More information about the gnucash-changes
mailing list