summaryrefslogtreecommitdiff
path: root/gobject-introspection
diff options
context:
space:
mode:
authorRico Tzschichholz <ricotz@ubuntu.com>2019-01-29 18:22:39 +0100
committerRico Tzschichholz <ricotz@ubuntu.com>2019-01-29 18:48:18 +0100
commit6da1f01d3d2ae93c03c42624b5e9b83b3b121f8f (patch)
tree56d448fc5a85e207f12021e0189f70a9a537b94c /gobject-introspection
parenta0d437af1ef37cdf7f985d7aa856b3bdb9eeeb9b (diff)
downloadvala-6da1f01d3d2ae93c03c42624b5e9b83b3b121f8f.tar.gz
g-i: Fix return value on error in start_discriminator()
Diffstat (limited to 'gobject-introspection')
-rw-r--r--gobject-introspection/gidlparser.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/gobject-introspection/gidlparser.c b/gobject-introspection/gidlparser.c
index 6a76b2ca7..81494414f 100644
--- a/gobject-introspection/gidlparser.c
+++ b/gobject-introspection/gidlparser.c
@@ -1562,9 +1562,16 @@ start_discriminator (GMarkupParseContext *context,
type = find_attribute ("type", attribute_names, attribute_values);
offset = find_attribute ("offset", attribute_names, attribute_values);
if (type == NULL)
- MISSING_ATTRIBUTE (error, element_name, "type");
+ {
+ MISSING_ATTRIBUTE (error, element_name, "type");
+ return FALSE;
+ }
else if (offset == NULL)
- MISSING_ATTRIBUTE (error, element_name, "offset");
+ {
+ MISSING_ATTRIBUTE (error, element_name, "offset");
+ return FALSE;
+ }
+ else
{
((GIdlNodeUnion *)ctx->current_node)->discriminator_type
= parse_type (type);