r20307 - gnucash/trunk/src/gnome-utils - Fix CRIT gtk warning if the old_page_long_name was NULL but still passed to g_strrstr.

Christian Stimming cstim at code.gnucash.org
Wed Feb 16 16:08:11 EST 2011


Author: cstim
Date: 2011-02-16 16:08:10 -0500 (Wed, 16 Feb 2011)
New Revision: 20307
Trac: http://svn.gnucash.org/trac/changeset/20307

Modified:
   gnucash/trunk/src/gnome-utils/gnc-main-window.c
Log:
Fix CRIT gtk warning if the old_page_long_name was NULL but still passed to g_strrstr.

Modified: gnucash/trunk/src/gnome-utils/gnc-main-window.c
===================================================================
--- gnucash/trunk/src/gnome-utils/gnc-main-window.c	2011-02-16 20:47:49 UTC (rev 20306)
+++ gnucash/trunk/src/gnome-utils/gnc-main-window.c	2011-02-16 21:08:10 UTC (rev 20307)
@@ -1920,7 +1920,8 @@
     /* Update Tooltip on notebook Tab */
     main_window_find_tab_event(window, page, &event_box);
 
-    if (g_strrstr(old_page_long_name, old_page_name) != NULL)
+    if (old_page_long_name && old_page_name
+        && g_strrstr(old_page_long_name, old_page_name) != NULL)
     {
         gchar *new_page_long_name;
         gint string_position;



More information about the gnucash-changes mailing list