src/dbus/qdbusabstractinterface.cpp
changeset 33 3e2da88830cd
parent 30 5dc02b23752f
--- a/src/dbus/qdbusabstractinterface.cpp	Tue Jul 06 15:10:48 2010 +0300
+++ b/src/dbus/qdbusabstractinterface.cpp	Wed Aug 18 10:37:55 2010 +0300
@@ -42,6 +42,8 @@
 #include "qdbusabstractinterface.h"
 #include "qdbusabstractinterface_p.h"
 
+#include <qthread.h>
+
 #include "qdbusargument.h"
 #include "qdbuspendingcall.h"
 #include "qdbusmessage_p.h"
@@ -440,7 +442,8 @@
     msg.setArguments(args);
 
     QDBusMessage reply = d->connection.call(msg, mode);
-    d->lastError = reply;       // will clear if reply isn't an error
+    if (thread() == QThread::currentThread())
+        d->lastError = reply;       // will clear if reply isn't an error
 
     // ensure that there is at least one element
     if (reply.arguments().isEmpty())