Silently do nothing if the widget is not a child. (Coverity)

2006-04-12  Matthias Clasen  <mclasen@redhat.com>

        * gtk/gtknotebook.c (gtk_notebook_remove): Silently do nothing
        if the widget is not a child.  (Coverity)
This commit is contained in:
Matthias Clasen 2006-04-12 04:13:06 +00:00 committed by Matthias Clasen
parent 3f201df5cb
commit 5585ce9e91
3 changed files with 14 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2006-04-12 Matthias Clasen <mclasen@redhat.com>
* gtk/gtknotebook.c (gtk_notebook_remove): Silently do nothing
if the widget is not a child. (Coverity)
2006-04-11 Matthias Clasen <mclasen@redhat.com> 2006-04-11 Matthias Clasen <mclasen@redhat.com>
* gdk/x11/gdkkeys-x11.c (get_xkb): Return early in error * gdk/x11/gdkkeys-x11.c (get_xkb): Return early in error

View File

@ -1,3 +1,8 @@
2006-04-12 Matthias Clasen <mclasen@redhat.com>
* gtk/gtknotebook.c (gtk_notebook_remove): Silently do nothing
if the widget is not a child. (Coverity)
2006-04-11 Matthias Clasen <mclasen@redhat.com> 2006-04-11 Matthias Clasen <mclasen@redhat.com>
* gdk/x11/gdkkeys-x11.c (get_xkb): Return early in error * gdk/x11/gdkkeys-x11.c (get_xkb): Return early in error

View File

@ -3299,7 +3299,10 @@ gtk_notebook_remove (GtkContainer *container,
page_num++; page_num++;
children = children->next; children = children->next;
} }
if (children == NULL)
return;
g_object_ref (widget); g_object_ref (widget);
gtk_notebook_real_remove (notebook, children); gtk_notebook_real_remove (notebook, children);