]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
Do not add extra argument to unref functions
authorEvan Nemerson <evan@coeus-group.com>
Tue, 27 Apr 2010 19:25:27 +0000 (12:25 -0700)
committerJürg Billeter <j@bitron.ch>
Thu, 27 May 2010 20:53:16 +0000 (22:53 +0200)
Fixes bug 615481.

codegen/valaccodebasemodule.vala

index dc558c73030b31133043d475dd0fec3596354678..48d859faf6bb4ebaf29c9ea62d18ce6697cee17b 100644 (file)
@@ -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"));