]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
codegen: Call ref_sink on objects passed to generic type 8c9f486a05d7d095e23d4209ec6801d398bc91fe
authorRico Tzschichholz <ricotz@ubuntu.com>
Mon, 30 Jul 2018 10:11:06 +0000 (12:11 +0200)
committerRico Tzschichholz <ricotz@ubuntu.com>
Mon, 30 Jul 2018 10:39:11 +0000 (12:39 +0200)
Regression of 6f1d0947bed9260436e7d2da18977b3925cdb0bd

Fixes https://gitlab.gnome.org/GNOME/vala/issues/655

codegen/valaccodebasemodule.vala

index 657d7ddbb985cf97851846d3e8ca6f6c01b58343..14886a3cc6935824b4fd52daeb3c449ee9397c5d 100644 (file)
@@ -5847,7 +5847,7 @@ public abstract class Vala.CCodeBaseModule : CodeGenerator {
                var result = ((GLibValue) value).copy ();
 
                if (type.value_owned
-                   && target_type is ObjectType && !target_type.floating_reference
+                   && (target_type is GenericType || (target_type is ObjectType && !target_type.floating_reference))
                    && type.floating_reference) {
                        /* floating reference, sink it.
                         */