From: Rico Tzschichholz Date: Mon, 30 Mar 2020 06:47:17 +0000 (+0200) Subject: codegen: Avoid critical trying to serialize an unsupported type to Variant X-Git-Tag: 0.46.8~44 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=db59187a7a97150c85026f5d7932e6b9fee2c8ff;p=thirdparty%2Fvala.git codegen: Avoid critical trying to serialize an unsupported type to Variant Fixes https://gitlab.gnome.org/GNOME/vala/issues/952 --- diff --git a/codegen/valagvariantmodule.vala b/codegen/valagvariantmodule.vala index ddbab1b88..782f2aec1 100644 --- a/codegen/valagvariantmodule.vala +++ b/codegen/valagvariantmodule.vala @@ -576,6 +576,7 @@ public class Vala.GVariantModule : GAsyncModule { if (result == null) { Report.error (type.source_reference, "GVariant deserialization of type `%s' is not supported".printf (type.to_string ())); + return new CCodeInvalidExpression (); } return result; @@ -868,6 +869,7 @@ public class Vala.GVariantModule : GAsyncModule { if (result == null) { Report.error (type.source_reference, "GVariant serialization of type `%s' is not supported".printf (type.to_string ())); + return new CCodeInvalidExpression (); } return result;