diff options
author | Matthias Clasen <mclasen@redhat.com> | 2006-05-19 20:33:18 +0000 |
---|---|---|
committer | Matthias Clasen <matthiasc@src.gnome.org> | 2006-05-19 20:33:18 +0000 |
commit | 08e382ce009c226153b63b9c4dc54d0009e71135 (patch) | |
tree | 4e5e65354ba7913cd47df2816eb26a854c1c3481 | |
parent | 09bdea115652006cd46b3a0bab338f9e553a8792 (diff) | |
download | gdk-pixbuf-08e382ce009c226153b63b9c4dc54d0009e71135.tar.gz |
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)
-rw-r--r-- | ChangeLog | 3 | ||||
-rw-r--r-- | ChangeLog.pre-2-10 | 3 | ||||
-rw-r--r-- | gtk/gtkpaned.c | 7 |
3 files changed, 11 insertions, 2 deletions
@@ -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/gtknotebook.c (gtk_notebook_pages_allocate): Fix a boundary case in scrolling where a tab was not shown. (#168105, Hiroyuki Ikezoe, patch by Kouhei Sutou) diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index b9e6bb8fb..29ac8ebdd 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -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/gtknotebook.c (gtk_notebook_pages_allocate): Fix a boundary case in scrolling where a tab was not shown. (#168105, Hiroyuki Ikezoe, patch by Kouhei Sutou) diff --git a/gtk/gtkpaned.c b/gtk/gtkpaned.c index bbdc215e5..13fd3a9d5 100644 --- a/gtk/gtkpaned.c +++ b/gtk/gtkpaned.c @@ -1245,8 +1245,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) |