[Gnucash-changes] fix potential null-pointer deref; fix indentation problems

Linas Vepstas linas at cvs.gnucash.org
Fri Aug 27 17:23:24 EDT 2004


Log Message:
-----------
fix potential null-pointer deref; fix indentation problems

Modified Files:
--------------
    gnucash/src/gnome-utils:
        gnc-mdi-utils.c

Revision Data
-------------
Index: gnc-mdi-utils.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome-utils/gnc-mdi-utils.c,v
retrieving revision 1.20
retrieving revision 1.21
diff -Lsrc/gnome-utils/gnc-mdi-utils.c -Lsrc/gnome-utils/gnc-mdi-utils.c -u -r1.20 -r1.21
--- src/gnome-utils/gnc-mdi-utils.c
+++ src/gnome-utils/gnc-mdi-utils.c
@@ -399,8 +399,8 @@
  */
 void
 gnc_mdi_child_auto_menu(GNCMDIChildInfo *mc,
-			GNCMDIAutoType type,
-			gchar *first_path, ...)
+                        GNCMDIAutoType type,
+                        gchar *first_path, ...)
 {
   GList *walker;
   va_list args;
@@ -409,10 +409,10 @@
   va_start(args, first_path);
   for (path = first_path; path != NULL; path = va_arg(args, gchar *)) {
     for (walker = g_list_first(mc->menu_names[type]);
-	 walker;
-	 walker = g_list_next(walker)) {
+         walker;
+         walker = g_list_next(walker)) {
       if (strcmp(path, walker->data) == 0)
-	break;
+        break;
     }
     if (walker) {
       /* Found. Don't add again. */
@@ -451,8 +451,8 @@
  */
 void
 gnc_mdi_child_auto_toolbar(GNCMDIChildInfo *mc,
-			   GNCMDIAutoType type,
-			   gchar *first_path, ...)
+                           GNCMDIAutoType type,
+                           gchar *first_path, ...)
 {
   GList *walker;
   gchar *path;
@@ -461,10 +461,10 @@
   va_start(args, first_path);
   for (path = first_path; path != NULL; path = va_arg(args, gchar *)) {
     for (walker = g_list_first(mc->toolbar_names[type]);
-	 walker;
-	 walker = g_list_next(walker)) {
+         walker;
+         walker = g_list_next(walker)) {
       if (strcmp(path, walker->data) == 0)
-	break;
+        break;
     }
     if (walker) {
       /* Found. Don't add again. */
@@ -555,8 +555,8 @@
   }
 
   summarybar = gnome_dock_get_item_by_name(GNOME_DOCK(mc->app->dock),
-					   "Summary Bar",
-					   &dc1, &dc2, &dc3, &dc4);
+                                           "Summary Bar",
+                                           &dc1, &dc2, &dc3, &dc4);
   if (!summarybar) {
     LEAVE("no summarybar");
     return;
@@ -797,7 +797,7 @@
  */
 void
 gnc_mdi_set_dispatch_cb (GNCMDIChildInfo * mc, GNCMDIDispatchType type,
-			 GtkCallback cb, gpointer data)
+                         GtkCallback cb, gpointer data)
 {
   g_return_if_fail(mc != NULL);
   g_return_if_fail(type < GNC_DISP_LAST);
@@ -845,7 +845,7 @@
       {
         if (oldbar->parent)
           gtk_widget_hide (GTK_WIDGET(oldbar)->parent);        
-	gnc_mdi_show_bars(childwin);
+          gnc_mdi_show_bars(childwin);
       }
     }
     else if (childwin->app)
@@ -906,7 +906,7 @@
   gnc_mdi_child_set_title (childwin);
 
   /* install menu hints if relevant */
-  if (mdi->active_child)
+  if (mdi && mdi->active_child)
   {
     /* the arg to this callback is SUPPOSED to be the last active child, 
      * but it gets to be NULL under some circumstances */
@@ -939,7 +939,7 @@
     if (mc && mc->toolbar) {
       gtk_toolbar_set_style (GTK_TOOLBAR(mc->toolbar), tbstyle);
       if (mc->app) {
-	gtk_widget_queue_resize(mc->app->dock);
+        gtk_widget_queue_resize(mc->app->dock);
       }
     }
   }


More information about the gnucash-changes mailing list