]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
codegen: Avoid critical trying to serialize an unsupported type to Variant
authorRico Tzschichholz <ricotz@ubuntu.com>
Mon, 30 Mar 2020 06:47:17 +0000 (08:47 +0200)
committerRico Tzschichholz <ricotz@ubuntu.com>
Mon, 20 Apr 2020 19:11:36 +0000 (21:11 +0200)
Fixes https://gitlab.gnome.org/GNOME/vala/issues/952

codegen/valagvariantmodule.vala

index ddbab1b885e70108359cb441bbb577263426670d..782f2aec1342bd13285bd487c7122c7c9926fd36 100644 (file)
@@ -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;