* qt/qdbusintegrator.cpp: Fix assertion failure spotted by
authorThiago Macieira <thiago@kde.org>
Sat, 29 Apr 2006 10:07:42 +0000 (10:07 +0000)
committerThiago Macieira <thiago@kde.org>
Sat, 29 Apr 2006 10:07:42 +0000 (10:07 +0000)
        Brad Hards.

ChangeLog
qt/qdbusintegrator.cpp

index 396990c..7a07e13 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2006-04-29  Thiago Macieira  <thiago.macieira@trolltech.com>
+
+       * qt/qdbusintegrator.cpp: Fix assertion failure spotted by
+       Brad Hards.
+
 2005-04-28  Robert McQueen  <robot101@debian.org>
 
        * glib/dbus-gproxy.c: Fix properties so that they can be given in
index 4dabd43..bef8268 100644 (file)
@@ -575,7 +575,6 @@ bool QDBusConnectionPrivate::activateSignal(const QDBusConnectionPrivate::Signal
     // Slots receive read-only copies of the message (i.e., pass by value or by const-ref)
     CallDeliveryEvent *call = prepareReply(hook.obj, hook.midx, hook.params, msg);
     if (call) {
-        call->conn = this;
         postCallDeliveryEvent(call);
         return true;
     }
@@ -633,7 +632,6 @@ bool QDBusConnectionPrivate::activateCall(QObject* object, int flags,
     // found the slot to be called
     // prepare for the call:
     CallDeliveryEvent *call = new CallDeliveryEvent;
-    call->conn = this;
 
     // parameters:
     call->object = object;
@@ -652,6 +650,8 @@ bool QDBusConnectionPrivate::activateCall(QObject* object, int flags,
 
 void QDBusConnectionPrivate::postCallDeliveryEvent(CallDeliveryEvent *data)
 {
+    Q_ASSERT(data);
+    data->conn = this;    
 #if USE_OUTSIDE_DISPATCH
     callDeliveryMutex.lock();
     callDeliveryState = data;