]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
Fix object creation that have delegate parameters being called once
authorLuca Bruno <lucabru@src.gnome.org>
Wed, 5 Jun 2013 20:57:45 +0000 (22:57 +0200)
committerLuca Bruno <lucabru@src.gnome.org>
Wed, 5 Jun 2013 20:57:45 +0000 (22:57 +0200)
codegen/valaccodebasemodule.vala

index 6f7f74f2c73e1ba30245381718c61eeca527ca4d..57dd1506909e84a8a20fa95905e2146d321f525e 100644 (file)
@@ -4584,7 +4584,7 @@ public abstract class Vala.CCodeBaseModule : CodeGenerator {
                                                                CCodeExpression delegate_target_destroy_notify;
                                                                var delegate_target = get_delegate_target_cexpression (arg, out delegate_target_destroy_notify);
                                                                carg_map.set (get_param_pos (get_ccode_delegate_target_pos (param)), delegate_target);
-                                                               if (deleg_type.value_owned) {
+                                                               if (deleg_type.value_owned && !deleg_type.is_called_once) {
                                                                        carg_map.set (get_param_pos (get_ccode_delegate_target_pos (param) + 0.01), delegate_target_destroy_notify);
                                                                }
                                                        }