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
2 changed files with 11 additions and 3 deletions
|
@ -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