Files
sablink-distro/sys-apps/dbus/files/dbus-0.60-mono-return-null-fix.diff
T
lxnay beb8433d07 add dbus 0.62 for compat
git-svn-id: http://svn.sabayonlinux.org/overlay@976 d7aec97c-591d-0410-af39-a8856400b30a
2007-02-21 06:59:43 +00:00

23 lines
1.0 KiB
Diff

--- mono/Connection.cs.old 2006-02-07 18:13:30.886925672 +0100
+++ mono/Connection.cs 2006-02-07 18:14:07.426370832 +0100
@@ -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) {
+ if (rawThis != IntPtr.Zero && ((GCHandle)rawThis).Target == typeof(DBus.Connection)) {
return (DBus.Connection) ((GCHandle)rawThis).Target;
}
}
--- mono/Message.cs.old 2006-02-07 18:11:27.917619848 +0100
+++ mono/Message.cs 2006-02-07 18:12:36.628174256 +0100
@@ -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)
+ 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