mirror of
https://github.com/Ryujinx/GtkSharp.git
synced 2024-12-23 18:05:29 +00:00
2007-11-29 Mike Kestner <mkestner@novell.com>
* glib/Signal.cs: ignore GCHandles with null targets since their object has been collected. [Fixes #344250 again] svn path=/trunk/gtk-sharp/; revision=90428
This commit is contained in:
parent
f5e6d14520
commit
3839abb463
|
@ -1,3 +1,8 @@
|
|||
2007-11-29 Mike Kestner <mkestner@novell.com>
|
||||
|
||||
* glib/Signal.cs: ignore GCHandles with null targets since
|
||||
their object has been collected. [Fixes #344250 again]
|
||||
|
||||
2007-11-28 Mike Kestner <mkestner@novell.com>
|
||||
|
||||
* glib/Object.cs: take ref using method param to avoid
|
||||
|
|
|
@ -140,12 +140,15 @@ namespace GLib {
|
|||
[CDeclCallback]
|
||||
delegate void voidObjectDelegate (IntPtr handle, IntPtr gch);
|
||||
|
||||
static void voidObjectCallback (IntPtr handle, IntPtr gch)
|
||||
static void voidObjectCallback (IntPtr handle, IntPtr data)
|
||||
{
|
||||
try {
|
||||
if (gch == IntPtr.Zero)
|
||||
if (data == IntPtr.Zero)
|
||||
return;
|
||||
Signal sig = ((GCHandle) gch).Target as Signal;
|
||||
GCHandle gch = (GCHandle) data;
|
||||
if (gch.Target == null)
|
||||
return;
|
||||
Signal sig = gch.Target as Signal;
|
||||
if (sig == null) {
|
||||
ExceptionManager.RaiseUnhandledException (new Exception ("Unknown signal class GC handle received."), false);
|
||||
return;
|
||||
|
|
Loading…
Reference in a new issue