mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-02-22 10:12:10 +01:00
Fix g_param_is_valid for GParam
The is_valid vfunc need to return the same condition that the validate vfunc uses to determine whether to 'fix' the value. param_param_validate is considering NULL to be a valid value, so param_param_is_valid needs to do the same. Fixes: #8576
This commit is contained in:
parent
d2818c2033
commit
241286a23b
@ -894,7 +894,7 @@ param_param_is_valid (GParamSpec *pspec,
|
||||
{
|
||||
GParamSpec *param = value->data[0].v_pointer;
|
||||
|
||||
return g_value_type_compatible (G_PARAM_SPEC_TYPE (param), G_PARAM_SPEC_VALUE_TYPE (pspec));
|
||||
return !param || g_value_type_compatible (G_PARAM_SPEC_TYPE (param), G_PARAM_SPEC_VALUE_TYPE (pspec));
|
||||
}
|
||||
|
||||
static gboolean
|
||||
|
Loading…
x
Reference in New Issue
Block a user