]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
Fix memory management in generic methods
authorJürg Billeter <j@bitron.ch>
Sat, 19 Sep 2009 09:17:01 +0000 (11:17 +0200)
committerJürg Billeter <j@bitron.ch>
Sat, 19 Sep 2009 10:12:10 +0000 (12:12 +0200)
codegen/valaccodebasemodule.vala

index 2b804c4dc1498f2c04ec095ed6652ab70eeb7659..1c168548234e5ca36d1cd0a8d9285160073fbfb6 100644 (file)
@@ -3279,7 +3279,7 @@ internal class Vala.CCodeBaseModule : CCodeModule {
                        return null;
                }
 
-               if (dupexpr is CCodeIdentifier && !(expression_type is ArrayType) && !is_ref_function_void (expression_type)) {
+               if (dupexpr is CCodeIdentifier && !(expression_type is ArrayType) && !(expression_type is GenericType) && !is_ref_function_void (expression_type)) {
                        // generate and call NULL-aware ref function to reduce number
                        // of temporary variables and simplify code