]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
Fix critical on invalid chain up
authorJürg Billeter <j@bitron.ch>
Fri, 25 Sep 2009 18:32:02 +0000 (20:32 +0200)
committerJürg Billeter <j@bitron.ch>
Fri, 25 Sep 2009 18:32:02 +0000 (20:32 +0200)
vala/valamethodcall.vala

index 44e9ee686f183daec8ef77ca37303bfe5ca93c98..7c31f6e3229b6b2637078df53a7fa2ab4acf86f2 100644 (file)
@@ -153,7 +153,11 @@ public class Vala.MethodCall : Expression {
                        var otype = (ObjectType) mtype;
                        var cl = (Class) otype.type_symbol;
                        var base_cm = cl.default_construction_method;
-                       if (!base_cm.has_construct_function) {
+                       if (base_cm == null) {
+                               error = true;
+                               Report.error (source_reference, "chain up to `%s' not supported".printf (cl.get_full_name ()));
+                               return false;
+                       } else if (!base_cm.has_construct_function) {
                                error = true;
                                Report.error (source_reference, "chain up to `%s' not supported".printf (base_cm.get_full_name ()));
                                return false;