From d2889d5a00fbab679e8b2d74d00b294bb203e4cd Mon Sep 17 00:00:00 2001 From: Alx Sa Date: Tue, 4 Mar 2025 00:21:02 +0000 Subject: [PATCH] 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. --- app/widgets/gimpeditor.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/widgets/gimpeditor.c b/app/widgets/gimpeditor.c index c73085a122..76cec81569 100644 --- a/app/widgets/gimpeditor.c +++ b/app/widgets/gimpeditor.c @@ -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