Navigation Menu

Skip to content

Commit

Permalink
Merge pull request #10 from daschuer/allocation_null
Browse files Browse the repository at this point in the history
Check for allocation = NULL. This fixes a segfault during applet load
  • Loading branch information
stefano-k committed Jun 25, 2014
2 parents e036725 + 551983e commit d2f003d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion mate-window-picker-applet/task-item.c
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion mate-window-picker-applet/task-title.c
Expand Up @@ -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,
Expand Down

0 comments on commit d2f003d

Please sign in to comment.