]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
vapigen: Fix crash in parse_signal
authorJürg Billeter <j@bitron.ch>
Wed, 23 Dec 2009 20:44:20 +0000 (21:44 +0100)
committerJürg Billeter <j@bitron.ch>
Wed, 23 Dec 2009 20:44:20 +0000 (21:44 +0100)
vapigen/valagidlparser.vala

index 2e609a16322896312361e64ff393163641457901..98eaa09414a82486cafa0016fbab8709bf354d79 100644 (file)
@@ -2133,6 +2133,10 @@ public class Vala.GIdlParser : CodeVisitor {
                                                        param_type.value_owned = true;
                                                }
                                        } else if (nv[0] == "type_name") {
+                                               if (!(param_type is UnresolvedType)) {
+                                                       param_type = new UnresolvedType ();
+                                                       p.parameter_type = param_type;
+                                               }
                                                ((UnresolvedType) param_type).unresolved_symbol = new UnresolvedSymbol (null, eval (nv[1]));
                                        } else if (nv[0] == "namespace_name") {
                                                ns_name = eval (nv[1]);