Tue Jan 8 22:47:44 EST 2002 Matt Kimball <matt@kimball.net>
authorMatt Kimball <mkimball@mono-cvs.ximian.com>
Wed, 9 Jan 2002 01:56:59 +0000 (01:56 -0000)
committerMatt Kimball <mkimball@mono-cvs.ximian.com>
Wed, 9 Jan 2002 01:56:59 +0000 (01:56 -0000)
* object.c: mono_string_new should return a NULL when the string
passed in is NULL -- not try to deference it.

svn path=/trunk/mono/; revision=1924

mono/metadata/ChangeLog
mono/metadata/object.c

index af263d6dd13f9e06bfde1de42692993f8d16a7d5..459aed821be7312d81c89d31c10ce6236d5b86ae 100644 (file)
@@ -1,4 +1,7 @@
-
+Tue Jan 8 22:47:44 EST 2002 Matt Kimball <matt@kimball.net>
+       * object.c: mono_string_new should return a NULL when the string 
+       passed in is NULL -- not try to deference it.
+       
 Sat Jan 5 15:48:04 CET 2002 Paolo Molaro <lupus@ximian.com>
 
        * icall.c: hack to make IsSubType work for TypeBuilders.
index dfdc92fb81fa9a0a48e4e83e857c80d3051a98f0..6794e020615d30798fbef063ff81a633802d3a7d 100644 (file)
@@ -226,6 +226,9 @@ mono_string_new (const char *text)
        glong items_written;
        int l;
 
+       if (text == NULL)
+               return NULL;
+
        l = strlen (text);
        
        ut = g_utf8_to_utf16 (text, l, NULL, &items_written, &error);