Commit 3d30a036 authored by Ell's avatar Ell

libgimpconfig: relax precondition check in gimp_config_type_register()

Allow passing a non-NULL `pspecs` with `n_pspecs == 0` to
gimp_config_type_register(), in particular since
g_object_class_list_properties() may return such values.
parent 88158db7
Pipeline #117526 passed with stages
in 11 minutes and 21 seconds
......@@ -83,8 +83,7 @@ gimp_config_type_register (GType parent_type,
g_return_val_if_fail (g_type_is_a (parent_type, G_TYPE_OBJECT), G_TYPE_NONE);
g_return_val_if_fail (type_name != NULL, G_TYPE_NONE);
g_return_val_if_fail ((pspecs == NULL && n_pspecs == 0) ||
(pspecs != NULL && n_pspecs > 0), G_TYPE_NONE);
g_return_val_if_fail (pspecs != NULL || n_pspecs == 0, G_TYPE_NONE);
terminated_pspecs = g_new0 (GParamSpec *, n_pspecs + 1);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment