The GtkObject destroy function can be called multiple times. Protect

from unregistering the component multiple times.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@12875 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
David Hampton
2006-01-19 04:02:01 +00:00
parent 18a90eaf39
commit 51bfd5a614
2 changed files with 9 additions and 1 deletions

View File

@@ -1,3 +1,9 @@
2006-01-18 David Hampton <hampton@employees.org>
* src/gnome-utils/gnc-query-list.c: The GtkObject destroy function
can be called multiple times. Protect from unregistering the
component multiple times.
2006-01-18 Joshua Sled <jsled@asynchronous.org>
* src/app-utils/gnc-account-merge.[ch]: C-style comment

View File

@@ -457,8 +457,10 @@ gnc_query_list_destroy (GtkObject *object)
GNCQueryListPriv *priv;
priv = GNC_QUERY_LIST_GET_PRIVATE(list);
if (priv->component_id >= 0)
if (priv->component_id > 0) {
gnc_unregister_gui_component (priv->component_id);
priv->component_id = 0;
}
if (list->query)
{
xaccFreeQuery(list->query);