[gimp] libgimp: fix gimp_procedure_config_get_values().
- From: Jehan <jehanp src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] libgimp: fix gimp_procedure_config_get_values().
- Date: Fri, 11 Feb 2022 16:58:07 +0000 (UTC)
commit 0734ac2aec350270dac53f3a4eef0e4ecb74c184
Author: Jehan <jehan girinstud io>
Date: Fri Feb 11 17:42:39 2022 +0100
libgimp: fix gimp_procedure_config_get_values().
The config object has one additional property per construction, which is
the "procedure" property.
libgimp/gimpprocedureconfig.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/libgimp/gimpprocedureconfig.c b/libgimp/gimpprocedureconfig.c
index 3dbd8cbea8..d8235b785b 100644
--- a/libgimp/gimpprocedureconfig.c
+++ b/libgimp/gimpprocedureconfig.c
@@ -294,12 +294,13 @@ gimp_procedure_config_get_values (GimpProcedureConfig *config,
gimp_procedure_get_aux_arguments (config->priv->procedure, &n_aux_args);
n_values = gimp_value_array_length (values);
- g_return_if_fail (n_pspecs == n_values + n_aux_args);
+ /* The config will have 1 additional property: "procedure". */
+ g_return_if_fail (n_pspecs == n_values + n_aux_args + 1);
- for (i = 0; i < n_values; i++)
+ for (i = 1; i < n_pspecs; i++)
{
GParamSpec *pspec = pspecs[i];
- GValue *value = gimp_value_array_index (values, i);
+ GValue *value = gimp_value_array_index (values, i - 1);
g_object_get_property (G_OBJECT (config), pspec->name, value);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]