mirror of
https://github.com/Ryujinx/GtkSharp.git
synced 2024-12-23 18:15: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>
|
||||
|
||||
* atk/Atk.metadata: hide Global.AddGlobalEventListener.
|
||||
|
|
|
@ -97,6 +97,8 @@
|
|||
|
||||
public override void Dispose ()
|
||||
{
|
||||
if (Handle == IntPtr.Zero)
|
||||
return;
|
||||
InternalDestroyed -= NativeDestroyHandler;
|
||||
base.Dispose ();
|
||||
}
|
||||
|
@ -109,12 +111,11 @@
|
|||
return base.Raw;
|
||||
}
|
||||
set {
|
||||
if (value != IntPtr.Zero)
|
||||
g_object_ref_sink (value);
|
||||
base.Raw = value;
|
||||
if (value == IntPtr.Zero)
|
||||
return;
|
||||
|
||||
g_object_ref_sink (value);
|
||||
InternalDestroyed += NativeDestroyHandler;
|
||||
if (value != IntPtr.Zero)
|
||||
InternalDestroyed += NativeDestroyHandler;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -123,8 +124,10 @@
|
|||
|
||||
public virtual void Destroy ()
|
||||
{
|
||||
if (Handle != IntPtr.Zero)
|
||||
gtk_object_destroy (Handle);
|
||||
if (Handle == IntPtr.Zero)
|
||||
return;
|
||||
InternalDestroyed -= NativeDestroyHandler;
|
||||
gtk_object_destroy (Handle);
|
||||
}
|
||||
|
||||
[DllImport("gtksharpglue-2")]
|
||||
|
|
Loading…
Reference in a new issue