From c3885bf7e7db0720fa884618e5d8f60ce3a6ef9d Mon Sep 17 00:00:00 2001 From: Evan Nemerson Date: Tue, 27 Apr 2010 12:25:27 -0700 Subject: [PATCH] Do not add extra argument to unref functions Fixes bug 615481. --- codegen/valaccodebasemodule.vala | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/codegen/valaccodebasemodule.vala b/codegen/valaccodebasemodule.vala index dc558c730..48d859faf 100644 --- a/codegen/valaccodebasemodule.vala +++ b/codegen/valaccodebasemodule.vala @@ -2945,10 +2945,11 @@ public class Vala.CCodeBaseModule : CCodeModule { var ccomma = new CCodeCommaExpression (); if (context.profile == Profile.GOBJECT) { - if (type.data_type == gstringbuilder_type - || type.data_type == garray_type - || type.data_type == gbytearray_type - || type.data_type == gptrarray_type) { + if (type.data_type != null && !type.data_type.is_reference_counting () && + (type.data_type == gstringbuilder_type + || type.data_type == garray_type + || type.data_type == gbytearray_type + || type.data_type == gptrarray_type)) { ccall.add_argument (new CCodeConstant ("TRUE")); } else if (type.data_type == gthreadpool_type) { ccall.add_argument (new CCodeConstant ("FALSE")); -- 2.47.3