forked from AuroraMiddleware/gtk
builder-tool: Avoid a crash
Be more careful about types that have been removed. I was getting criticals when converting ui files containing GtkToolbars.
This commit is contained in:
parent
168b21c77e
commit
cb018ec047
@ -589,7 +589,7 @@ static gboolean
|
|||||||
property_is_boolean (Element *element,
|
property_is_boolean (Element *element,
|
||||||
MyParserData *data)
|
MyParserData *data)
|
||||||
{
|
{
|
||||||
GParamSpec *pspec;
|
GParamSpec *pspec = NULL;
|
||||||
const char *class_name;
|
const char *class_name;
|
||||||
const char *property_name;
|
const char *property_name;
|
||||||
int i;
|
int i;
|
||||||
@ -605,7 +605,8 @@ property_is_boolean (Element *element,
|
|||||||
property_name = (const char *)element->attribute_values[i];
|
property_name = (const char *)element->attribute_values[i];
|
||||||
}
|
}
|
||||||
|
|
||||||
pspec = get_property_pspec (data, class_name, property_name, kind);
|
if (class_name && property_name)
|
||||||
|
pspec = get_property_pspec (data, class_name, property_name, kind);
|
||||||
if (pspec)
|
if (pspec)
|
||||||
return G_PARAM_SPEC_VALUE_TYPE (pspec) == G_TYPE_BOOLEAN;
|
return G_PARAM_SPEC_VALUE_TYPE (pspec) == G_TYPE_BOOLEAN;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user