From 1cce7a24b7fc7f26d57fd6c987f57865ec9f71b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20K=C3=B6hler?= Date: Mon, 6 Aug 2007 15:40:55 +0000 Subject: [PATCH] Avoid critical warnings when searching interactively in account tree. gnc_account_n_children will print those when it is called with NULL. git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@16393 57a11ea4-9604-0410-9ed3-97b8803252fd --- src/gnome/gnc-plugin-page-account-tree.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gnome/gnc-plugin-page-account-tree.c b/src/gnome/gnc-plugin-page-account-tree.c index 186e6d635a..e128e267c6 100644 --- a/src/gnome/gnc-plugin-page-account-tree.c +++ b/src/gnome/gnc-plugin-page-account-tree.c @@ -667,7 +667,7 @@ gnc_plugin_page_account_tree_selection_changed_cb (GtkTreeSelection *selection, 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. */ }