Avoid warnings if a child is NULL. (#342007, Patrick Monnerat)

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)
This commit is contained in:
Matthias Clasen 2006-05-19 20:32:28 +00:00 committed by Matthias Clasen
parent a59a999d7c
commit 1843f0e418
3 changed files with 11 additions and 2 deletions

View 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

View 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

View 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)