]> Pileus Git - ~andy/gtk/commitdiff
Avoid warnings if a child is NULL. (#342007, Patrick Monnerat)
authorMatthias Clasen <mclasen@redhat.com>
Fri, 19 May 2006 20:32:28 +0000 (20:32 +0000)
committerMatthias Clasen <matthiasc@src.gnome.org>
Fri, 19 May 2006 20:32:28 +0000 (20:32 +0000)
2006-05-19  Matthias Clasen  <mclasen@redhat.com>

* gtk/gtkpaned.c (gtk_paned_compute_position): Avoid warnings
if a child is NULL.  (#342007, Patrick Monnerat)

ChangeLog
ChangeLog.pre-2-10
gtk/gtkpaned.c

index 9b35a6993610fff38b492d6b4bfc554f00b234fc..149fbbcee87fa19ba43a3e9f8e0f48e3844077e4 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2006-05-19  Matthias Clasen  <mclasen@redhat.com>
 
+       * gtk/gtkpaned.c (gtk_paned_compute_position): Avoid warnings
+       if a child is NULL.  (#342007, Patrick Monnerat)
+       
        * gtk/gtk.symbols: 
        * gtk/gtkprintoperation.h: 
        * gtk/gtkprintoperation.c (gtk_print_operation_cancel): New function
index 9b35a6993610fff38b492d6b4bfc554f00b234fc..149fbbcee87fa19ba43a3e9f8e0f48e3844077e4 100644 (file)
@@ -1,5 +1,8 @@
 2006-05-19  Matthias Clasen  <mclasen@redhat.com>
 
+       * gtk/gtkpaned.c (gtk_paned_compute_position): Avoid warnings
+       if a child is NULL.  (#342007, Patrick Monnerat)
+       
        * gtk/gtk.symbols: 
        * gtk/gtkprintoperation.h: 
        * gtk/gtkprintoperation.c (gtk_print_operation_cancel): New function
index 716858cc87567f947c067a11a57ca79a9ed75596..a377c523e38ad7e6e3b2ce1de0330e7f3ec3e0a1 100644 (file)
@@ -1213,8 +1213,11 @@ gtk_paned_compute_position (GtkPaned *paned,
                              paned->min_position,
                              paned->max_position);
 
-  gtk_widget_set_child_visible (paned->child1, paned->child1_size != 0);
-  gtk_widget_set_child_visible (paned->child2, paned->child1_size != allocation);
+  if (paned->child1)
+    gtk_widget_set_child_visible (paned->child1, paned->child1_size != 0);
+  
+  if (paned->child2)
+    gtk_widget_set_child_visible (paned->child2, paned->child1_size != allocation); 
 
   g_object_freeze_notify (G_OBJECT (paned));
   if (paned->child1_size != old_position)