2002-08-09 Mike Kestner <mkestner@speakeasy.net>

* generator/ObjectGen.cs (GenerateMapper): guard against IntPtr.Zero

svn path=/trunk/gtk-sharp/; revision=6569
This commit is contained in:
Mike Kestner 2002-08-09 16:26:41 +00:00
parent 03a91f8672
commit 6365d4113b
2 changed files with 7 additions and 0 deletions

View File

@ -1,3 +1,7 @@
2002-08-09 Mike Kestner <mkestner@speakeasy.net>
* generator/ObjectGen.cs (GenerateMapper): guard against IntPtr.Zero
2002-08-09 Duncan Mak <duncan@ximian.com>
* sample/Fifteen.cs (Position): Made it a property instead of a

View File

@ -221,6 +221,9 @@ namespace GtkSharp.Generation {
sw.WriteLine ();
sw.WriteLine ("\t\tpublic static GLib.Object CreateObject (IntPtr raw)");
sw.WriteLine ("\t\t{");
sw.WriteLine ("\t\t\tif (raw == IntPtr.Zero)");
sw.WriteLine ("\t\t\t\treturn null;");
sw.WriteLine ();
sw.WriteLine ("\t\t\tstring typename = gtksharp_get_type_name (raw);");
sw.WriteLine ("\t\t\tif (!types.ContainsKey(typename))");
sw.WriteLine ("\t\t\t\treturn null;");