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



commit f83ab7c6dd970438c10608e39b2e199db767b9cc
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]