glib2/f0dd96c28751f15d0703b384bfc7c314af01caa8.diff
2022-10-10 10:45:49 +00:00

15 lines
472 B
Diff

diff --git a/gobject/gparamspecs.c b/gobject/gparamspecs.c
index f17b3488b9b0e9a376dcd9e999062613ac580497..17b8606572385dca8453e7d5a6194db0706dad08 100644
--- a/gobject/gparamspecs.c
+++ b/gobject/gparamspecs.c
@@ -894,6 +894,9 @@ param_param_is_valid (GParamSpec *pspec,
{
GParamSpec *param = value->data[0].v_pointer;
+ if (param == NULL)
+ return FALSE;
+
return g_value_type_compatible (G_PARAM_SPEC_TYPE (param), G_PARAM_SPEC_VALUE_TYPE (pspec));
}