make sure g2g_object_class_find_property returns NULL on error. This fixes LADSPA plugin which is a GoodThing

Original commit message from CVS:
make sure g2g_object_class_find_property returns NULL on error. This fixes LADSPA plugin which is a GoodThing
This commit is contained in:
Steve Baker 2001-09-15 14:47:37 +00:00
parent acd074aae9
commit 1477b02850

View file

@ -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;
}