[vala] MemberAccess: Fix crash in .to_string()



commit a3471783900f0cc8568d09ec45abb99183f56ae3
Author: Ryan Lortie <desrt desrt ca>
Date:   Tue Aug 24 19:25:43 2010 +0200

    MemberAccess: Fix crash in .to_string()
    
    MemberAccess.to_string() would crash if it was run before the symbol
    resolver.  Fix that.

 vala/valamemberaccess.vala |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/vala/valamemberaccess.vala b/vala/valamemberaccess.vala
index 443e67b..6548fc5 100644
--- a/vala/valamemberaccess.vala
+++ b/vala/valamemberaccess.vala
@@ -132,7 +132,7 @@ public class Vala.MemberAccess : Expression {
 	}
 
 	public override string to_string () {
-		if (symbol_reference.is_instance_member ()) {
+		if (symbol_reference == null || symbol_reference.is_instance_member ()) {
 			if (inner == null) {
 				return member_name;
 			} else {



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