From a03c9f329e86cace6557fc68dac8b89a15993ee4 Mon Sep 17 00:00:00 2001 From: Tero Ahola Date: Wed, 8 Feb 2012 09:50:40 +0200 Subject: Fixed crash issue in QtDBus if D-Bus not installed Task-number: QTBUG-23128 Change-Id: Iba47ddf2fbbfa56499c4c4e28899190f6b63efac Reviewed-by: Thiago Macieira --- src/dbus/qdbusconnection.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dbus/qdbusconnection.cpp b/src/dbus/qdbusconnection.cpp index b685a73..8c10e2b 100644 --- a/src/dbus/qdbusconnection.cpp +++ b/src/dbus/qdbusconnection.cpp @@ -1111,7 +1111,7 @@ public: if (!instance) { qWarning("QDBusConnection: %s D-Bus connection created before QCoreApplication. Application may misbehave.", type == SessionBus ? "session" : type == SystemBus ? "system" : "generic"); - } else { + } else if (QDBusConnectionPrivate::d(*this)) { QDBusConnectionPrivate::d(*this)->moveToThread(instance->thread()); } } -- cgit v0.12