--- dbus-sharp-0.63/mono/Connection.cs.gchandle 2006-08-30 15:14:28.000000000 +0200
+++ dbus-sharp-0.63/mono/Connection.cs 2006-08-30 15:17:01.000000000 +0200
@@ -116,7 +116,7 @@
// Maybe we already have a Connection object associated with
// this rawConnection then return it
IntPtr rawThis = dbus_connection_get_data (rawConnection, slot);
- if (rawThis != IntPtr.Zero && ((GCHandle)rawThis).Target == typeof(DBus.Connection)) {
+ if (rawThis != IntPtr.Zero && (((GCHandle)rawThis).Target != null)) {
return (DBus.Connection) ((GCHandle)rawThis).Target;
}
}
--- dbus-sharp-0.63/mono/Message.cs.gchandle 2006-08-30 15:14:20.000000000 +0200
+++ dbus-sharp-0.63/mono/Message.cs 2006-08-30 15:16:45.000000000 +0200
@@ -110,7 +110,7 @@
if (slot > -1) {
// If we already have a Message object associated with this rawMessage then return it
IntPtr rawThis = dbus_message_get_data(rawMessage, slot);
- if (rawThis != IntPtr.Zero && ((GCHandle)rawThis).Target == typeof(DBus.Message))
+ if (rawThis != IntPtr.Zero && (((GCHandle)rawThis).Target != null))
return (DBus.Message) ((GCHandle)rawThis).Target;
}
// If it doesn't exist then create a new Message around it