From: Jürg Billeter Date: Thu, 16 Jul 2009 17:45:33 +0000 (+0200) Subject: Fix crash when using dynamic properties on unsupported types X-Git-Tag: 0.7.5~84 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=997c5add827ea5faf44802ad9df20533f957b0c6;p=thirdparty%2Fvala.git Fix crash when using dynamic properties on unsupported types --- diff --git a/codegen/valaccodemodule.vala b/codegen/valaccodemodule.vala index 1743d2e75..6cbd3b1f6 100644 --- a/codegen/valaccodemodule.vala +++ b/codegen/valaccodemodule.vala @@ -345,10 +345,18 @@ public abstract class Vala.CCodeModule { } public virtual string get_dynamic_property_getter_cname (DynamicProperty node) { + if (next == null) { + Report.error (node.source_reference, "dynamic properties are not supported for %s".printf (node.dynamic_type.to_string ())); + return ""; + } return next.get_dynamic_property_getter_cname (node); } public virtual string get_dynamic_property_setter_cname (DynamicProperty node) { + if (next == null) { + Report.error (node.source_reference, "dynamic properties are not supported for %s".printf (node.dynamic_type.to_string ())); + return ""; + } return next.get_dynamic_property_setter_cname (node); }