summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Schürmann <[email protected]>2014-06-09 19:20:23 +0200
committerinfirit <[email protected]>2014-09-25 14:58:33 +0200
commit7a7eab1f14146a98b849279b6d6fa1482319cd52 (patch)
treef28701abf898c96b1c802a79d2ddb3bbe8a4e765
parentaf43adf813298053c5c93fccf84b3a7f0dba82da (diff)
downloadmate-netbook-7a7eab1f14146a98b849279b6d6fa1482319cd52.tar.bz2
mate-netbook-7a7eab1f14146a98b849279b6d6fa1482319cd52.tar.xz
Check for allocation = NULL. This fixes a segfault during applet load
-rw-r--r--mate-window-picker-applet/task-item.c4
-rw-r--r--mate-window-picker-applet/task-title.c2
2 files changed, 4 insertions, 2 deletions
diff --git a/mate-window-picker-applet/task-item.c b/mate-window-picker-applet/task-item.c
index cafcb2c..366dea0 100644
--- a/mate-window-picker-applet/task-item.c
+++ b/mate-window-picker-applet/task-item.c
@@ -106,9 +106,11 @@ update_hints (TaskItem *item)
/* Set the minimize hint for the window */
gtk_widget_get_allocation (widget, allocation);
- wnck_window_set_icon_geometry (window, x, y,
+ if (allocation) {
+ wnck_window_set_icon_geometry (window, x, y,
allocation->width,
allocation->height);
+ }
}
static gboolean
diff --git a/mate-window-picker-applet/task-title.c b/mate-window-picker-applet/task-title.c
index 546e331..e81dfd3 100644
--- a/mate-window-picker-applet/task-title.c
+++ b/mate-window-picker-applet/task-title.c
@@ -407,7 +407,7 @@ on_expose (GtkWidget *eb, GdkEventExpose *event)
style = gtk_widget_get_style (eb);
state = gtk_widget_get_state (eb);
- if (state == GTK_STATE_ACTIVE)
+ if (state == GTK_STATE_ACTIVE && allocation)
gtk_paint_box (style,
#if GTK_CHECK_VERSION (3, 0, 0)
cr,