[vala/0.46] codegen: Avoid critical trying to serialize an unsupported type to Variant



commit db59187a7a97150c85026f5d7932e6b9fee2c8ff
Author: Rico Tzschichholz <ricotz ubuntu com>
Date:   Mon Mar 30 08:47:17 2020 +0200

    codegen: Avoid critical trying to serialize an unsupported type to Variant
    
    Fixes https://gitlab.gnome.org/GNOME/vala/issues/952

 codegen/valagvariantmodule.vala | 2 ++
 1 file changed, 2 insertions(+)
---
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;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]