diff --git a/ChangeLog b/ChangeLog index 9b35a69936..149fbbcee8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2006-05-19 Matthias Clasen + * 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 diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 9b35a69936..149fbbcee8 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,5 +1,8 @@ 2006-05-19 Matthias Clasen + * 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 diff --git a/gtk/gtkpaned.c b/gtk/gtkpaned.c index 716858cc87..a377c523e3 100644 --- a/gtk/gtkpaned.c +++ b/gtk/gtkpaned.c @@ -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)