]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
Fixed properties
authorJCWasmx86 <JCWasmx86@t-online.de>
Sun, 5 Jun 2022 20:12:43 +0000 (22:12 +0200)
committerRico Tzschichholz <ricotz@ubuntu.com>
Sat, 29 Apr 2023 19:00:17 +0000 (21:00 +0200)
dbusgen/valadbusparser.vala

index 4222fdc953824ba372a0b9b5edd817b1bc25ac00..a05df00e83f77d8f2a5644eddb77df1a1883c572 100644 (file)
@@ -447,7 +447,10 @@ public class Vala.DBusParser : CodeVisitor {
                }
 
                if (access == "read" || access == "readwrite") {
-                       current_property.get_accessor = new PropertyAccessor (true, false, false, current_property.property_type.copy (), null, get_current_src ());
+                       var get_type = current_property.property_type.copy ();
+                       if (data_type is StructValueType)
+                               get_type.value_owned = true;
+                       current_property.get_accessor = new PropertyAccessor (true, false, false, get_type, null, get_current_src ());
                }
                if (access == "write" || access == "readwrite") {
                        var set_type = current_property.property_type.copy ();