shell: Assert when the panel is empty
Rather than getting a segfault. https://bugzilla.gnome.org/show_bug.cgi?id=719711
This commit is contained in:
parent
f020b73fb1
commit
ce0387d54f
1 changed files with 5 additions and 3 deletions
|
@ -190,16 +190,18 @@ cc_panel_get_preferred_height (GtkWidget *widget,
|
||||||
|
|
||||||
static void
|
static void
|
||||||
cc_panel_size_allocate (GtkWidget *widget,
|
cc_panel_size_allocate (GtkWidget *widget,
|
||||||
GtkAllocation *allocation)
|
GtkAllocation *allocation)
|
||||||
{
|
{
|
||||||
GtkAllocation child_allocation;
|
GtkAllocation child_allocation;
|
||||||
|
GtkWidget *child;
|
||||||
|
|
||||||
gtk_widget_set_allocation (widget, allocation);
|
gtk_widget_set_allocation (widget, allocation);
|
||||||
|
|
||||||
child_allocation = *allocation;
|
child_allocation = *allocation;
|
||||||
|
|
||||||
gtk_widget_size_allocate (gtk_bin_get_child (GTK_BIN (widget)),
|
child = gtk_bin_get_child (GTK_BIN (widget));
|
||||||
&child_allocation);
|
g_assert (child);
|
||||||
|
gtk_widget_size_allocate (child, &child_allocation);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue