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>
|
2007-11-28 Mike Kestner <mkestner@novell.com>
|
||||||
|
|
||||||
* glib/Object.cs: take ref using method param to avoid
|
* glib/Object.cs: take ref using method param to avoid
|
||||||
|
|
|
@ -140,12 +140,15 @@ namespace GLib {
|
||||||
[CDeclCallback]
|
[CDeclCallback]
|
||||||
delegate void voidObjectDelegate (IntPtr handle, IntPtr gch);
|
delegate void voidObjectDelegate (IntPtr handle, IntPtr gch);
|
||||||
|
|
||||||
static void voidObjectCallback (IntPtr handle, IntPtr gch)
|
static void voidObjectCallback (IntPtr handle, IntPtr data)
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
if (gch == IntPtr.Zero)
|
if (data == IntPtr.Zero)
|
||||||
return;
|
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) {
|
if (sig == null) {
|
||||||
ExceptionManager.RaiseUnhandledException (new Exception ("Unknown signal class GC handle received."), false);
|
ExceptionManager.RaiseUnhandledException (new Exception ("Unknown signal class GC handle received."), false);
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in a new issue