summaryrefslogtreecommitdiff
path: root/gtk/gtkstatusbar.c
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2011-01-31 11:32:19 -0500
committerMatthias Clasen <mclasen@redhat.com>2011-01-31 11:51:44 -0500
commit1d8bac64b2fb833fad9d3d9746c35e62e851e76b (patch)
tree9535e843d71b2f0588cc9c6e9a079dcb6913fdc0 /gtk/gtkstatusbar.c
parent47b2868a087ff1dbf34c4c76df3bbc002a19c979 (diff)
downloadgtk+-1d8bac64b2fb833fad9d3d9746c35e62e851e76b.tar.gz
Fix a segfault in gtk_statusbar_remove_all
https://bugzilla.gnome.org/show_bug.cgi?id=640487
Diffstat (limited to 'gtk/gtkstatusbar.c')
-rw-r--r--gtk/gtkstatusbar.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/gtk/gtkstatusbar.c b/gtk/gtkstatusbar.c
index 3edecbe3a7..74b32571c6 100644
--- a/gtk/gtkstatusbar.c
+++ b/gtk/gtkstatusbar.c
@@ -518,7 +518,10 @@ gtk_statusbar_remove_all (GtkStatusbar *statusbar,
if (prev == NULL)
prev = statusbar->messages;
- list = prev->next;
+ if (prev)
+ list = prev->next;
+ else
+ list = NULL;
}
else
{