Fixed gtk_builder_value_from_string_type() to always assign the GError

when returning FALSE, fixes bgo #615000.
This commit is contained in:
Tristan Van Berkom 2010-04-06 16:23:13 -04:00
parent b9002febd8
commit d92ee6dc68

View File

@ -1390,14 +1390,19 @@ gtk_builder_value_from_string_type (GtkBuilder *builder,
ret = FALSE;
break;
default:
g_set_error (error,
GTK_BUILDER_ERROR,
GTK_BUILDER_ERROR_INVALID_VALUE,
"Unsupported GType `%s'",
g_type_name (type));
ret = FALSE;
break;
}
/* Catch unassigned error for object types as well as any unsupported types.
* While parsing GtkBuilder; object types are deserialized
* without calling gtk_builder_value_from_string_type().
*/
if (!ret && error && *error == NULL)
g_set_error (error,
GTK_BUILDER_ERROR,
GTK_BUILDER_ERROR_INVALID_VALUE,
"Unsupported GType `%s'", g_type_name (type));
return ret;
}