]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
Fix nullable struct properties
authorJürg Billeter <j@bitron.ch>
Tue, 22 Sep 2009 20:58:10 +0000 (22:58 +0200)
committerJürg Billeter <j@bitron.ch>
Tue, 22 Sep 2009 20:58:10 +0000 (22:58 +0200)
Fixes bug 595587.

codegen/valaccodememberaccessmodule.vala

index 70e3cc94b101a111994a95accf0f526662450767..cd537bcbc1ae5f29c8ad56895883a07914fdf749 100644 (file)
@@ -385,7 +385,8 @@ internal class Vala.CCodeMemberAccessModule : CCodeControlFlowModule {
                                                if (current_property_accessor != null &&
                                                    current_property_accessor.writable &&
                                                    current_property_accessor.value_parameter == p &&
-                                                   current_property_accessor.prop.property_type.is_real_struct_type ()) {
+                                                   current_property_accessor.prop.property_type.is_real_struct_type () &&
+                                                   !current_property_accessor.prop.property_type.nullable) {
                                                        expr.ccodenode = new CCodeIdentifier ("(*value)");
                                                } else {
                                                        expr.ccodenode = get_variable_cexpression (p.name);