]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
Fix crash when using dynamic properties on unsupported types
authorJürg Billeter <j@bitron.ch>
Thu, 16 Jul 2009 17:45:33 +0000 (19:45 +0200)
committerJürg Billeter <j@bitron.ch>
Thu, 16 Jul 2009 17:45:33 +0000 (19:45 +0200)
codegen/valaccodemodule.vala

index 1743d2e75cb119deb90b4250893b9fbc413b1316..6cbd3b1f6a69c78eaf819cc024d674b6b4001012 100644 (file)
@@ -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);
        }