From 19be79178db91a4ea290ca89d7d71cd08cc7ca6d Mon Sep 17 00:00:00 2001 From: Jehan Date: Wed, 14 Feb 2024 23:43:26 +0100 Subject: [PATCH] app: fix reading GeglColor arguments in pluginrc. A GeglColor may be without profile (when the space doesn't require one or if the default profile is used for the model). --- app/plug-in/plug-in-rc.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/app/plug-in/plug-in-rc.c b/app/plug-in/plug-in-rc.c index 56930cdefa..5d4967f7ea 100644 --- a/app/plug-in/plug-in-rc.c +++ b/app/plug-in/plug-in-rc.c @@ -948,16 +948,21 @@ plug_in_proc_arg_deserialize (GScanner *scanner, bpp > 40 || ! gimp_scanner_parse_data (scanner, bpp, &data) || ! gimp_scanner_parse_string (scanner, &encoding) || - ! gimp_scanner_parse_int (scanner, &profile_size) || - ! gimp_scanner_parse_data (scanner, profile_size, &profile_data)) + ! gimp_scanner_parse_int (scanner, &profile_size)) { g_free (data); g_free (encoding); - g_free (profile_data); token = G_TOKEN_INT; goto error; } + if (profile_size > 0 && ! gimp_scanner_parse_data (scanner, profile_size, &profile_data)) + { + g_free (profile_data); + + token = G_TOKEN_STRING; + goto error; + } if (bpp > 0) {