[vala] girparser: Fix criticals when encountering async creation methods



commit 32d14db5e110b1e815f608dc6bbfd5adc1910cb7
Author: JÃrg Billeter <j bitron ch>
Date:   Tue Jun 26 08:40:53 2012 +0200

    girparser: Fix criticals when encountering async creation methods

 vala/valagirparser.vala |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/vala/valagirparser.vala b/vala/valagirparser.vala
index f7c5dd3..0b01f20 100644
--- a/vala/valagirparser.vala
+++ b/vala/valagirparser.vala
@@ -3429,7 +3429,10 @@ public class Vala.GirParser : CodeVisitor {
 	void process_async_method (Node node) {
 		var m = (Method) node.symbol;
 		string finish_method_base;
-		if (m.name.has_suffix ("_async")) {
+		if (m.name == null) {
+			assert (m is CreationMethod);
+			finish_method_base = "new";
+		} else if (m.name.has_suffix ("_async")) {
 			finish_method_base = m.name.substring (0, m.name.length - "_async".length);
 		} else {
 			finish_method_base = m.name;



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