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).


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@16392 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Andreas Köhler
2007-08-06 10:30:08 +00:00
parent a1be6f3458
commit 9056b19e0c
+1 -1
View File
@@ -1291,7 +1291,7 @@ get_ui_fullname (AccountWindow *aw)
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;