r17516 - gnucash/branches/2.2/src/gnome-utils - [r17435] Debugging: Fix a LEAVE() call to prevent crashing if commodity is NULL.
Andreas Köhler
andi5 at cvs.gnucash.org
Sun Sep 14 17:30:20 EDT 2008
Author: andi5
Date: 2008-09-14 17:30:19 -0400 (Sun, 14 Sep 2008)
New Revision: 17516
Trac: http://svn.gnucash.org/trac/changeset/17516
Modified:
gnucash/branches/2.2/src/gnome-utils/gnc-tree-view-commodity.c
Log:
[r17435] Debugging: Fix a LEAVE() call to prevent crashing if commodity is NULL.
Committed by cedayiv.
Modified: gnucash/branches/2.2/src/gnome-utils/gnc-tree-view-commodity.c
===================================================================
--- gnucash/branches/2.2/src/gnome-utils/gnc-tree-view-commodity.c 2008-09-14 21:30:11 UTC (rev 17515)
+++ gnucash/branches/2.2/src/gnome-utils/gnc-tree-view-commodity.c 2008-09-14 21:30:19 UTC (rev 17516)
@@ -823,7 +823,8 @@
model = gtk_tree_model_filter_get_model(GTK_TREE_MODEL_FILTER(f_model));
commodity = gnc_tree_model_commodity_get_commodity (GNC_TREE_MODEL_COMMODITY(model),
&iter);
- LEAVE("commodity %p (%s)", commodity, gnc_commodity_get_mnemonic (commodity));
+ LEAVE("commodity %p (%s)", commodity,
+ commodity? gnc_commodity_get_mnemonic(commodity) : "");
return commodity;
}
More information about the gnucash-changes
mailing list