Fix #10589 CRTICAL on empty label on resource chooser widget

This commit is contained in:
bootchk 2024-01-05 11:05:32 -05:00 committed by Lloyd Konneker
parent 9bc59ba543
commit 1553f8b88c

View file

@ -237,8 +237,14 @@ gimp_resource_chooser_constructed (GObject *object)
GimpResourceChooserPrivate *priv;
priv = gimp_resource_chooser_get_instance_private (GIMP_RESOURCE_CHOOSER (object));
/* Set text of label widget now since underlying property might have changed.
* Not when empty string: set_text throws CRITICAL on empty string!
*/
if (priv->label != NULL)
{
gtk_label_set_text_with_mnemonic (GTK_LABEL (priv->label_widget), priv->label);
gtk_widget_show (GTK_WIDGET (priv->label_widget));
}
G_OBJECT_CLASS (gimp_resource_chooser_parent_class)->constructed (object);
}