]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
Fix critical when using immutable classes without copy function
authorJürg Billeter <j@bitron.ch>
Wed, 7 Jan 2009 22:39:16 +0000 (22:39 +0000)
committerJürg Billeter <juergbi@src.gnome.org>
Wed, 7 Jan 2009 22:39:16 +0000 (22:39 +0000)
2009-01-07  Jürg Billeter  <j@bitron.ch>

* gobject/valaccodebasemodule.vala:

Fix critical when using immutable classes without copy function

svn path=/trunk/; revision=2290

ChangeLog
gobject/valaccodebasemodule.vala

index f4d1dc4945914dc5d58d2d431561880026201663..b9e367e97bf17aa3fc77eb450d39ddd5939cbe72 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2009-01-07  Jürg Billeter  <j@bitron.ch>
+
+       * gobject/valaccodebasemodule.vala:
+
+       Fix critical when using immutable classes without copy function
+
 2009-01-07  Jürg Billeter  <j@bitron.ch>
 
        * vala/valasymbolresolver.vala:
index fd8c5e25a2788f975bf9f8f0c18a9bc8747c7740..ce94c97be48a9dc5fb7778103252295ff2a58b72 100644 (file)
@@ -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) {