[vala] Guard for possible errors when checking the value of constants



commit a4d21426be1e1256b3368bb68ced00a49906dcc7
Author: Luca Bruno <lucabru src gnome org>
Date:   Tue Aug 2 16:25:31 2011 +0200

    Guard for possible errors when checking the value of constants
    
    Fixes bug 655726.

 vala/valaconstant.vala |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/vala/valaconstant.vala b/vala/valaconstant.vala
index b805203..53b84c6 100644
--- a/vala/valaconstant.vala
+++ b/vala/valaconstant.vala
@@ -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;



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