* mono/Connection.cs, mono/Message.cs: Check Target type
Patch from Aaron Bockover (abockover at novell.com)
+2006-04-19 John (J5) Palmieri <johnp@redhat.com>
+
+ * mono/Connection.cs, mono/Message.cs: Check Target type
+ Patch from Aaron Bockover (abockover at novell.com)
+
2006-04-13 Thiago Macieira <thiago.macieira@trolltech.com>
* INSTALL: fine-tune the requirements for the Qt4 binding.
// 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) {
+ if (rawThis != IntPtr.Zero && ((GCHandle)rawThis).Target == typeof(DBus.Connection)) {
return (DBus.Connection) ((GCHandle)rawThis).Target;
}
}
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)
+ if (rawThis != IntPtr.Zero && ((GCHandle)rawThis).Target == typeof(DBus.Message))
return (DBus.Message) ((GCHandle)rawThis).Target;
}
// If it doesn't exist then create a new Message around it