Commit 7448c7f8 authored by Jehan's avatar Jehan

libgimpwidgets: do not assume a GimpFrame has a child.

This fixes 2 CRITICALs when creating a GimpFrame without a child. There
are reasons to create empty frames (for instance to conditionnally add
contents later, and use it as a label only otherwise).
parent ea67537d
......@@ -168,8 +168,11 @@ gimp_frame_child_notify (GimpFrame *frame)
{
GtkWidget *child = gtk_bin_get_child (GTK_BIN (frame));
gtk_widget_set_margin_start (child, gimp_frame_get_indent (frame));
gtk_widget_set_margin_top (child, gimp_frame_get_label_spacing (frame));
if (child)
{
gtk_widget_set_margin_start (child, gimp_frame_get_indent (frame));
gtk_widget_set_margin_top (child, gimp_frame_get_label_spacing (frame));
}
}
static gint
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment