Fix #10511 ScriptFu CRITICAL on scripts with no dialog, e.g. Reverse Layers
Magic number 1 changed to 2 in one place. Missed in earlier fix for #10127. Changed magic number to a defined macro constant so it might not happen again, should GimpConfig change again.
This commit is contained in:
@ -175,11 +175,8 @@ script_fu_run_procedure (GimpProcedure *procedure,
|
||||
}
|
||||
|
||||
case GIMP_RUN_NONINTERACTIVE:
|
||||
/* Verify actual args count equals declared arg count.
|
||||
* Scripts declare args except run_mode (SF hides it.)
|
||||
* pspecs have run_mode and one extra internal pspec, thus +2.
|
||||
*/
|
||||
if (n_pspecs != script->n_args + n_aux_args + 2)
|
||||
/* Verify actual args count equals declared arg count. */
|
||||
if (n_pspecs != script->n_args + n_aux_args + SF_ARG_TO_CONFIG_OFFSET)
|
||||
status = GIMP_PDB_CALLING_ERROR;
|
||||
|
||||
if (status == GIMP_PDB_SUCCESS)
|
||||
|
Reference in New Issue
Block a user