[vala/parallel-0.10: 25/37] MemberAccess: Fix crash in .to_string()



commit 3fd408e50f1c9d3e0422e0fbea40118a41889f42
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]