From: Evan Nemerson Date: Tue, 27 Apr 2010 19:25:27 +0000 (-0700) Subject: Do not add extra argument to unref functions X-Git-Tag: 0.9.1~36 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=c3885bf7e7db0720fa884618e5d8f60ce3a6ef9d;p=thirdparty%2Fvala.git Do not add extra argument to unref functions Fixes bug 615481. --- 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"));