summaryrefslogtreecommitdiff
path: root/src/plugins
diff options
context:
space:
mode:
authorKai Koehne <kai.koehne@nokia.com>2011-05-03 16:45:46 +0200
committerKai Koehne <kai.koehne@nokia.com>2011-05-04 17:17:18 +0200
commit7b41c76d92f50373c77cbb5fa64284100a3a4431 (patch)
treeb00ccbb896bea45503880d0ab44b4873a9cd9112 /src/plugins
parentb7f30ed9f39ef172a32d321251b08feba1a54a2d (diff)
downloadqt-creator-7b41c76d92f50373c77cbb5fa64284100a3a4431.tar.gz
QmlProfiler: Fix crash in qWarning
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/qmlprofiler/qmlprofilertool.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/plugins/qmlprofiler/qmlprofilertool.cpp b/src/plugins/qmlprofiler/qmlprofilertool.cpp
index 1c199fa77f..b14800bcdf 100644
--- a/src/plugins/qmlprofiler/qmlprofilertool.cpp
+++ b/src/plugins/qmlprofiler/qmlprofilertool.cpp
@@ -431,8 +431,13 @@ void QmlProfilerTool::tryToConnect()
} else if (d->m_connectionAttempts == 50) {
d->m_connectionTimer.stop();
d->m_connectionAttempts = 0;
- if (QmlProfilerPlugin::debugOutput)
- qWarning("QmlProfiler: Failed to connect: %s", qPrintable(d->m_client->errorString()));
+ if (QmlProfilerPlugin::debugOutput) {
+ if (d->m_client) {
+ qWarning("QmlProfiler: Failed to connect: %s", qPrintable(d->m_client->errorString()));
+ } else {
+ qWarning("QmlProfiler: Failed to connect.");
+ }
+ }
emit connectionFailed();
} else {
connectToClient();