From b9277e094aae72f91de9657891e0e7e8298e237a Mon Sep 17 00:00:00 2001 From: Jehan Date: Mon, 6 Apr 2026 18:06:30 +0200 Subject: [PATCH] app: allow pango_context not existing. This fixes a CRITICAL on exit when calling GIMP with --no-fonts: > g_object_unref: assertion 'G_IS_OBJECT (object)' failed --- app/text/gimpfontfactory.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/text/gimpfontfactory.c b/app/text/gimpfontfactory.c index cedc341509..3ee4ea260d 100644 --- a/app/text/gimpfontfactory.c +++ b/app/text/gimpfontfactory.c @@ -217,7 +217,7 @@ gimp_font_factory_finalize (GObject *object) g_slist_free_full (GET_PRIVATE (font_factory)->fonts_renaming_config, (GDestroyNotify) g_free); g_free (GET_PRIVATE (font_factory)->sysconf); g_free (GET_PRIVATE (font_factory)->conf); - g_object_unref (GET_PRIVATE (font_factory)->pango_context); + g_clear_object (&GET_PRIVATE (font_factory)->pango_context); FcConfigDestroy (FcConfigGetCurrent ()); G_OBJECT_CLASS (parent_class)->finalize (object);