2003-10-09 Mike Kestner <mkestner@ximian.com>

* generator/Property.cs : don't do new for Objects if FromNativeReturn
        returns null.  [Fixes #48055]

svn path=/trunk/gtk-sharp/; revision=18793
This commit is contained in:
Mike Kestner 2003-10-09 05:16:37 +00:00
parent 732cdf7729
commit aa9ff69ce1
2 changed files with 6 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2003-10-09 Mike Kestner <mkestner@ximian.com>
* generator/Property.cs : don't do new for Objects if FromNativeReturn
returns null. [Fixes #48055]
2003-10-08 Mike Kestner <mkestner@ximian.com>
* */Makefile.in : rework the prefix handling for duncan's packaging.

View File

@ -124,7 +124,7 @@ namespace GtkSharp.Generation {
if (table.IsObject (c_type))
sw.WriteLine ("\t\t\t\tbool ref_owned = false;");
sw.WriteLine("\t\t\t\t" + cs_type + " ret = " + table.FromNativeReturn(c_type, "raw_ret") + ";");
if (!table.IsBoxed (c_type))
if (!table.IsBoxed (c_type) && !table.IsObject (c_type))
sw.WriteLine("\t\t\t\tif (ret == null) ret = new " + cs_type + "(raw_ret);");
} else {
sw.Write("\t\t\t\t" + cs_type + " ret = ");