diff options
author | Luca Bruno <lucabru@src.gnome.org> | 2013-10-06 21:06:46 +0200 |
---|---|---|
committer | Luca Bruno <lucabru@src.gnome.org> | 2013-10-06 21:10:49 +0200 |
commit | a09c9e93af0d64b9331c274de573465fe070b722 (patch) | |
tree | 0738c9086ac06489e730d253e9d453570f0d678f /vala/valaproperty.vala | |
parent | 5f7c87354bab55477739405ecdc41e69a8de45f8 (diff) | |
download | vala-a09c9e93af0d64b9331c274de573465fe070b722.tar.gz |
Set parent_node and always copy datatype when assigned to code nodes.
This is a delicate patch that fixes subtle memory corruption bugs in
libvala users and the compiler itself.
It might break some application, so this commit is open for testing.
Diffstat (limited to 'vala/valaproperty.vala')
-rw-r--r-- | vala/valaproperty.vala | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/vala/valaproperty.vala b/vala/valaproperty.vala index 8a8ced49b..300fb4dd1 100644 --- a/vala/valaproperty.vala +++ b/vala/valaproperty.vala @@ -33,8 +33,9 @@ public class Vala.Property : Symbol, Lockable { public DataType? property_type { get { return _data_type; } set { - _data_type = value; + _data_type = null; if (value != null) { + _data_type = value.copy (); _data_type.parent_node = this; } } |