widgets: Prevent CRITICAL introduced in b7e9634d
When used outside of the dockable dialogues, GimpEditor objects might not have a label widget assigned. This patch adds a check to make sure it does before trying to change its text.
This commit is contained in:
parent
4012f93e62
commit
d2889d5a00
1 changed files with 3 additions and 2 deletions
|
|
@ -816,8 +816,9 @@ gimp_editor_set_name (GimpEditor *editor,
|
|||
{
|
||||
g_return_if_fail (GIMP_IS_EDITOR (editor));
|
||||
|
||||
gtk_label_set_text (GTK_LABEL (editor->priv->name_label),
|
||||
name ? name : _("(None)"));
|
||||
if (editor->priv->name_label && GTK_IS_LABEL (editor->priv->name_label))
|
||||
gtk_label_set_text (GTK_LABEL (editor->priv->name_label),
|
||||
name ? name : _("(None)"));
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
|||
Loading…
Reference in a new issue