app: print error message when failing to open from command line…

… even when we have no display.

gimp_message() supports a NULL handler object and we get proper
GIMP-Error message printed on stderr, e.g. when GIMP is run from the
build system.
We want as much info as possible when debugging our build scripts.
This is part of fixes to improve situations such as seen in #16160.
This commit is contained in:
Jehan 2026-04-04 16:00:46 +02:00
parent c1a228ea48
commit 864abd6be0

View file

@ -694,7 +694,7 @@ file_open_from_command_line (Gimp *gimp,
g_object_ref (file),
(GDestroyNotify) g_object_unref);
}
else if (status != GIMP_PDB_SUCCESS && status != GIMP_PDB_CANCEL && display)
else if (status != GIMP_PDB_SUCCESS && status != GIMP_PDB_CANCEL)
{
gimp_message (gimp, G_OBJECT (display), GIMP_MESSAGE_ERROR,
_("Opening '%s' failed: %s"),