diff --git a/gst/gobject2gtk.c b/gst/gobject2gtk.c index a539d401ce..c53aa366ad 100644 --- a/gst/gobject2gtk.c +++ b/gst/gobject2gtk.c @@ -109,16 +109,16 @@ g2g_object_class_find_property(GObjectClass *class, const gchar *name) //fprintf(stderr,"class name is %s\n",gtk_type_name(class->type)); - gtk_object_arg_get_info(class->type,name,&info); + // the return value NULL if no error + if (gtk_object_arg_get_info(class->type,name,&info) != NULL) { + return NULL; + } + spec = g_new0(GParamSpec,1); - if (info) { - spec->name = (gchar *) name; - spec->value_type = info->type; - spec->flags = info->arg_flags; - } else { - spec->value_type = GTK_TYPE_NONE; - } + spec->name = (gchar *) name; + spec->value_type = info->type; + spec->flags = info->arg_flags; return spec; }