mirror of
https://github.com/Ryujinx/GtkSharp.git
synced 2024-12-24 01:05:30 +00:00
2008-05-02 Mike Kestner <mkestner@novell.com>
* gtk/Object.custom: some NULL guarding in Dispose and Destroy handling. svn path=/trunk/gtk-sharp/; revision=102347
This commit is contained in:
parent
9ff6fc7588
commit
9bc789f2e6
|
@ -1,3 +1,8 @@
|
||||||
|
2008-05-02 Mike Kestner <mkestner@novell.com>
|
||||||
|
|
||||||
|
* gtk/Object.custom: some NULL guarding in Dispose and
|
||||||
|
Destroy handling.
|
||||||
|
|
||||||
2008-05-02 Mike Kestner <mkestner@novell.com>
|
2008-05-02 Mike Kestner <mkestner@novell.com>
|
||||||
|
|
||||||
* atk/Atk.metadata: hide Global.AddGlobalEventListener.
|
* atk/Atk.metadata: hide Global.AddGlobalEventListener.
|
||||||
|
|
|
@ -97,6 +97,8 @@
|
||||||
|
|
||||||
public override void Dispose ()
|
public override void Dispose ()
|
||||||
{
|
{
|
||||||
|
if (Handle == IntPtr.Zero)
|
||||||
|
return;
|
||||||
InternalDestroyed -= NativeDestroyHandler;
|
InternalDestroyed -= NativeDestroyHandler;
|
||||||
base.Dispose ();
|
base.Dispose ();
|
||||||
}
|
}
|
||||||
|
@ -109,12 +111,11 @@
|
||||||
return base.Raw;
|
return base.Raw;
|
||||||
}
|
}
|
||||||
set {
|
set {
|
||||||
|
if (value != IntPtr.Zero)
|
||||||
|
g_object_ref_sink (value);
|
||||||
base.Raw = value;
|
base.Raw = value;
|
||||||
if (value == IntPtr.Zero)
|
if (value != IntPtr.Zero)
|
||||||
return;
|
InternalDestroyed += NativeDestroyHandler;
|
||||||
|
|
||||||
g_object_ref_sink (value);
|
|
||||||
InternalDestroyed += NativeDestroyHandler;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -123,8 +124,10 @@
|
||||||
|
|
||||||
public virtual void Destroy ()
|
public virtual void Destroy ()
|
||||||
{
|
{
|
||||||
if (Handle != IntPtr.Zero)
|
if (Handle == IntPtr.Zero)
|
||||||
gtk_object_destroy (Handle);
|
return;
|
||||||
|
InternalDestroyed -= NativeDestroyHandler;
|
||||||
|
gtk_object_destroy (Handle);
|
||||||
}
|
}
|
||||||
|
|
||||||
[DllImport("gtksharpglue-2")]
|
[DllImport("gtksharpglue-2")]
|
||||||
|
|
Loading…
Reference in a new issue