From 76a255caa1aa99f822450870f727369b6de932fe Mon Sep 17 00:00:00 2001 From: Jehan Date: Fri, 9 Jan 2026 17:30:40 +0100 Subject: [PATCH] app: take into account possibility of NULL error. Normally the error should not be NULL if file_open_layers() returns no layers. But just in case, in order not to crash when we could avoid it, let's double-check. --- app/dialogs/file-open-dialog.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/dialogs/file-open-dialog.c b/app/dialogs/file-open-dialog.c index 01e41880ce..8f3e29e6af 100644 --- a/app/dialogs/file-open-dialog.c +++ b/app/dialogs/file-open-dialog.c @@ -298,7 +298,7 @@ file_open_dialog_open_layers (GtkWidget *dialog, { gimp_message (image->gimp, G_OBJECT (dialog), GIMP_MESSAGE_ERROR, _("Opening '%s' failed:\n\n%s"), - gimp_file_get_utf8_name (file), error->message); + gimp_file_get_utf8_name (file), error ? error->message: _("n/a")); g_clear_error (&error); }