diff options
author | Jürg Billeter <j@bitron.ch> | 2009-09-25 20:32:02 +0200 |
---|---|---|
committer | Jürg Billeter <j@bitron.ch> | 2009-09-25 20:32:02 +0200 |
commit | 5f512d5d8a527782ce0abf0de6a24e580b3acc0c (patch) | |
tree | 0b1be36710dca7530c9a53892d8b283851da4821 /vala/valamethodcall.vala | |
parent | dd9803724a0300129016f9b113ac3ecb847ea14b (diff) | |
download | vala-5f512d5d8a527782ce0abf0de6a24e580b3acc0c.tar.gz |
Fix critical on invalid chain up
Diffstat (limited to 'vala/valamethodcall.vala')
-rw-r--r-- | vala/valamethodcall.vala | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/vala/valamethodcall.vala b/vala/valamethodcall.vala index 44e9ee686..7c31f6e32 100644 --- a/vala/valamethodcall.vala +++ b/vala/valamethodcall.vala @@ -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; |