]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
Fix crash when using VAPI properties outside of a class
authorJürg Billeter <j@bitron.ch>
Wed, 6 Aug 2008 13:00:55 +0000 (13:00 +0000)
committerJürg Billeter <juergbi@src.gnome.org>
Wed, 6 Aug 2008 13:00:55 +0000 (13:00 +0000)
2008-08-06  Jürg Billeter  <j@bitron.ch>

* gobject/valaccodegenerator.vala:

Fix crash when using VAPI properties outside of a class

svn path=/trunk/; revision=1735

ChangeLog
gobject/valaccodegenerator.vala

index a2efe0f62b7bce88b583bc6cdcb9fd5a1f9e019d..c64bf797e1e74d258b7c2c5eb42df6f75f05d03e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2008-08-06  Jürg Billeter  <j@bitron.ch>
+
+       * gobject/valaccodegenerator.vala:
+
+       Fix crash when using VAPI properties outside of a class
+
 2008-08-05  Thijs Vermeir  <thijsvermeir@gmail.com>
 
        * vapi/packages/gstreamer-0.10/gstreamer-0.10-custom.vala:
index 08b7ea4e98dcf7a327a2f4016c065d0eab4d2a90..b044937e4cdd7925dc62abe70ba212f37556398d 100644 (file)
@@ -953,7 +953,8 @@ public class Vala.CCodeGenerator : CodeGenerator {
                        }
 
                        // notify on property changes
-                       if (current_class.is_subtype_of (gobject_type) &&
+                       var typesymbol = (TypeSymbol) prop.parent_symbol;
+                       if (typesymbol.is_subtype_of (gobject_type) &&
                            prop.notify &&
                            prop.access != SymbolAccessibility.PRIVATE && // FIXME: use better means to detect gobject properties
                            (acc.writable || acc.construction)) {