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

codegen/valagvariantmodule.vala

index dc5952599fe7b29d82a39174fe965ec078781a36..bd45a77387c3808fa92723b801a2ebaf60795a66 100644 (file)
@@ -576,6 +576,7 @@ public class Vala.GVariantModule : GValueModule {
 
                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 : GValueModule {
 
                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;