From: Rico Tzschichholz Date: Tue, 29 Jan 2019 17:22:39 +0000 (+0100) Subject: g-i: Fix return value on error in start_discriminator() X-Git-Tag: 0.42.6~22 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cd445737c0b5352a60e61e3ab4d4314445d72a97;p=thirdparty%2Fvala.git g-i: Fix return value on error in start_discriminator() --- 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);