mirror of
https://github.com/Ryujinx/GtkSharp.git
synced 2024-12-24 17:05:29 +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,11 +111,10 @@
|
||||||
return base.Raw;
|
return base.Raw;
|
||||||
}
|
}
|
||||||
set {
|
set {
|
||||||
base.Raw = value;
|
if (value != IntPtr.Zero)
|
||||||
if (value == IntPtr.Zero)
|
|
||||||
return;
|
|
||||||
|
|
||||||
g_object_ref_sink (value);
|
g_object_ref_sink (value);
|
||||||
|
base.Raw = value;
|
||||||
|
if (value != IntPtr.Zero)
|
||||||
InternalDestroyed += NativeDestroyHandler;
|
InternalDestroyed += NativeDestroyHandler;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -123,7 +124,9 @@
|
||||||
|
|
||||||
public virtual void Destroy ()
|
public virtual void Destroy ()
|
||||||
{
|
{
|
||||||
if (Handle != IntPtr.Zero)
|
if (Handle == IntPtr.Zero)
|
||||||
|
return;
|
||||||
|
InternalDestroyed -= NativeDestroyHandler;
|
||||||
gtk_object_destroy (Handle);
|
gtk_object_destroy (Handle);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue