File 0164-qdbuscontext-nocrash.diff of Package libqt4
qt-bugs@ issue: none
Trolltech task ID: none
applied: yes
author: Trolltech
Add patch found in Qt 4.3 snapshot 20070315.
I wonder why it's not part of beta 1.
=== tools/qdbus/src/qdbusintegrator.cpp
==================================================================
--- tools/qdbus/src/qdbusintegrator.cpp (revision 491)
+++ tools/qdbus/src/qdbusintegrator.cpp (revision 492)
@@ -694,7 +694,9 @@
fail = data.object->qt_metacall(QMetaObject::InvokeMetaMethod,
data.slotIdx, params.data()) >= 0;
QDBusConnectionPrivate::setSender(0);
- QDBusContextPrivate::set(data.object, old);
+ // the object might be deleted in the slot
+ if (!data.object.isNull())
+ QDBusContextPrivate::set(data.object, old);
}
// do we create a reply? Only if the caller is waiting for a reply and one hasn't been sent