summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/gtkext/gtkextstatusbar.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/gtkext/gtkextstatusbar.c b/src/gtkext/gtkextstatusbar.c
index 74c23bd..8051d41 100644
--- a/src/gtkext/gtkextstatusbar.c
+++ b/src/gtkext/gtkextstatusbar.c
@@ -539,7 +539,9 @@ status_blob_info *init_progessive_status(GtkExtStatusBar *bar, const char *messa
result = (status_blob_info *)calloc(1, sizeof(status_blob_info));
- g_object_ref(G_OBJECT(bar));
+ if (bar != NULL)
+ g_object_ref(G_OBJECT(bar));
+
result->bar = bar;
result->id = gtk_extended_status_bar_push(bar, message, max > 0.0);
@@ -569,8 +571,7 @@ void fini_progessive_status(status_blob_info *info)
gtk_extended_status_bar_remove(info->bar, info->id);
if (info->bar != NULL)
-
- g_object_unref(G_OBJECT(info->bar));
+ g_object_unref(G_OBJECT(info->bar));
free(info);