From: Jürg Billeter Date: Wed, 7 Jan 2009 22:39:16 +0000 (+0000) Subject: Fix critical when using immutable classes without copy function X-Git-Tag: VALA_0_5_4~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=78616e76ddb3c2ab3ac6699a8a6f97b998abc095;p=thirdparty%2Fvala.git Fix critical when using immutable classes without copy function 2009-01-07 Jürg Billeter * gobject/valaccodebasemodule.vala: Fix critical when using immutable classes without copy function svn path=/trunk/; revision=2290 --- diff --git a/ChangeLog b/ChangeLog index f4d1dc494..b9e367e97 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2009-01-07 Jürg Billeter + + * gobject/valaccodebasemodule.vala: + + Fix critical when using immutable classes without copy function + 2009-01-07 Jürg Billeter * vala/valasymbolresolver.vala: diff --git a/gobject/valaccodebasemodule.vala b/gobject/valaccodebasemodule.vala index fd8c5e25a..ce94c97be 100644 --- a/gobject/valaccodebasemodule.vala +++ b/gobject/valaccodebasemodule.vala @@ -1619,6 +1619,9 @@ public class Vala.CCodeBaseModule : CCodeModule { } else if (cl != null && cl.is_immutable) { // allow duplicates of immutable instances as for example strings dup_function = type.data_type.get_dup_function (); + if (dup_function == null) { + dup_function = ""; + } } else if (type is ValueType) { dup_function = type.data_type.get_dup_function (); if (dup_function == null && type.nullable) {