[vala] girparser: Fix criticals when autoreparenting methods due to aliases



commit 7e067a4d6ad3d28a4407a87eb817616571ab3690
Author: Luca Bruno <lucabru src gnome org>
Date:   Thu May 26 20:45:00 2011 +0200

    girparser: Fix criticals when autoreparenting methods due to aliases

 vala/valagirparser.vala |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/vala/valagirparser.vala b/vala/valagirparser.vala
index 683ed4d..36fbe3d 100644
--- a/vala/valagirparser.vala
+++ b/vala/valagirparser.vala
@@ -2953,7 +2953,8 @@ public class Vala.GirParser : CodeVisitor {
 		var old_best = best;
 		if (current.symbol is Namespace) {
 			foreach (var child in current.members) {
-				if (is_container (child.symbol) && cname.has_prefix (child.get_lower_case_cprefix ())) {
+				// symbol is null only for aliases that aren't yet processed
+				if ((child.symbol == null || is_container (child.symbol)) && cname.has_prefix (child.get_lower_case_cprefix ())) {
 					find_parent (cname, child, ref best, ref match);
 				}
 			}



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