]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
Guard for possible errors when checking the value of constants
authorLuca Bruno <lucabru@src.gnome.org>
Tue, 2 Aug 2011 14:25:31 +0000 (16:25 +0200)
committerLuca Bruno <lucabru@src.gnome.org>
Tue, 2 Aug 2011 14:26:56 +0000 (16:26 +0200)
Fixes bug 655726.

vala/valaconstant.vala

index b805203a0a59078f759eca2b8170bd041d3b3a79..53b84c60e0eb91807dac1943915b4216660e7dda 100644 (file)
@@ -138,7 +138,10 @@ public class Vala.Constant : Symbol, Lockable {
                        } else {
                                value.target_type = type_reference;
 
-                               value.check (context);
+                               if (!value.check (context)) {
+                                       error = true;
+                                       return false;
+                               }
 
                                if (!value.value_type.compatible (type_reference)) {
                                        error = true;