2009-01-09 Mike Kestner <mkestner@novell.com>

* glib/Opaque.cs (GetOpaque): return null for IntPtr.Zero.

svn path=/trunk/gtk-sharp/; revision=123140
This commit is contained in:
Mike Kestner 2009-01-12 22:15:47 +00:00
parent dc069c7338
commit 33849fd085
2 changed files with 7 additions and 0 deletions

View File

@ -1,3 +1,7 @@
2009-01-09 Mike Kestner <mkestner@novell.com>
* glib/Opaque.cs (GetOpaque): return null for IntPtr.Zero.
2009-01-09 Mike Kestner <mkestner@novell.com>
* configure.in.in: don't hardcode CC when cross-compiling.

View File

@ -44,6 +44,9 @@ namespace GLib {
public static Opaque GetOpaque (IntPtr o, Type type, bool owned)
{
if (o == IntPtr.Zero)
return null;
Opaque opaque = (Opaque)Activator.CreateInstance (type, new object[] { o });
if (owned) {
if (opaque.owned) {