From 0cd02069173a1a9ca77e15328546769331a7c39d Mon Sep 17 00:00:00 2001 From: Alx Sa Date: Thu, 14 Nov 2024 13:25:06 +0000 Subject: [PATCH] app/plug-in: Fix expected argument count for Layer/Channel menus Resolves issue #12365 Per Kamil Burda, since we no longer have an array length parameter for layer and channel procedures, the required minimum size of procedure->num_args should be 3 and not 4. --- app/plug-in/gimppluginprocedure.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/plug-in/gimppluginprocedure.c b/app/plug-in/gimppluginprocedure.c index a075db6f3f..8b03156086 100644 --- a/app/plug-in/gimppluginprocedure.c +++ b/app/plug-in/gimppluginprocedure.c @@ -669,7 +669,7 @@ gimp_plug_in_procedure_add_menu_path (GimpPlugInProcedure *proc, } else if (g_str_has_prefix (menu_path, "")) { - if ((procedure->num_args < 4) || + if ((procedure->num_args < 3) || ! GIMP_IS_PARAM_SPEC_RUN_MODE (procedure->args[0]) || ! GIMP_IS_PARAM_SPEC_IMAGE (procedure->args[1]) || ! (G_TYPE_FROM_INSTANCE (procedure->args[2]) == GIMP_TYPE_PARAM_CORE_OBJECT_ARRAY)) @@ -692,7 +692,7 @@ gimp_plug_in_procedure_add_menu_path (GimpPlugInProcedure *proc, } else if (g_str_has_prefix (menu_path, "")) { - if ((procedure->num_args < 4) || + if ((procedure->num_args < 3) || ! GIMP_IS_PARAM_SPEC_RUN_MODE (procedure->args[0]) || ! GIMP_IS_PARAM_SPEC_IMAGE (procedure->args[1]) || ! (G_TYPE_FROM_INSTANCE (procedure->args[2]) == GIMP_TYPE_PARAM_CORE_OBJECT_ARRAY))