mirror of
https://github.com/Ryujinx/GtkSharp.git
synced 2024-12-23 23:15:31 +00:00
glib: Fix calling to Free() twice for the same ToggleRef
Apparently the recent changes in gtk-sharp master that changed the destroy/dispose strategy caused a bug about calling g_object_remove_toggle_ref() twice because now Dispose(true) could call ToggleRef.Free() directly bypassing ToggleRef.QueueUnref(). This change makes sure that the ref is removed from the PendingDestroys list.
This commit is contained in:
parent
c7657fcab4
commit
228a2b3da4
|
@ -59,6 +59,10 @@ namespace GLib {
|
|||
|
||||
public void Free ()
|
||||
{
|
||||
lock (PendingDestroys) {
|
||||
PendingDestroys.Remove (this);
|
||||
}
|
||||
|
||||
if (hardened)
|
||||
g_object_unref (handle);
|
||||
else
|
||||
|
|
Loading…
Reference in a new issue