summaryrefslogtreecommitdiffstats
path: root/src/dbus
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@nokia.com>2010-04-29 11:14:09 (GMT)
committerThiago Macieira <thiago.macieira@nokia.com>2010-04-29 11:19:16 (GMT)
commitce3d9fb3b3ec1f23d76b04a8593680d7eeee689d (patch)
treefebf82fb0fbb7178c8598304c8a83abc1724a9a6 /src/dbus
parent78e8af4fea3cc527b0dc5ace5a4c4445f044c2cd (diff)
downloadQt-ce3d9fb3b3ec1f23d76b04a8593680d7eeee689d.zip
Qt-ce3d9fb3b3ec1f23d76b04a8593680d7eeee689d.tar.gz
Qt-ce3d9fb3b3ec1f23d76b04a8593680d7eeee689d.tar.bz2
Fix crash in QDBusInterface when invoking a method in a derived class.
If metaObject is 0 and the signal or slot is in a class deriving from QDBusInterface, this would lead to a crash. Deriving from QDBusInterface is very unusual and usually indicates misunderstanding of QtDBus, but the fix is correct. Task-number: https://projects.maemo.org/bugzilla/show_bug.cgi?id=165175 Patch-By: Maemo developer Reviewed-by: Thiago Macieira <thiago.macieira@nokia.com>
Diffstat (limited to 'src/dbus')
-rw-r--r--src/dbus/qdbusinterface.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/dbus/qdbusinterface.cpp b/src/dbus/qdbusinterface.cpp
index 300f425..56d5231 100644
--- a/src/dbus/qdbusinterface.cpp
+++ b/src/dbus/qdbusinterface.cpp
@@ -258,7 +258,7 @@ void *QDBusInterface::qt_metacast(const char *_clname)
int QDBusInterface::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
_id = QDBusAbstractInterface::qt_metacall(_c, _id, _a);
- if (_id < 0 || !d_func()->isValid)
+ if (_id < 0 || !d_func()->isValid || !d_func()->metaObject)
return _id;
return d_func()->metacall(_c, _id, _a);
}