diff options
author | Kai Koehne <kai.koehne@nokia.com> | 2011-05-03 16:45:46 +0200 |
---|---|---|
committer | Kai Koehne <kai.koehne@nokia.com> | 2011-05-04 17:17:18 +0200 |
commit | 7b41c76d92f50373c77cbb5fa64284100a3a4431 (patch) | |
tree | b00ccbb896bea45503880d0ab44b4873a9cd9112 /src/plugins | |
parent | b7f30ed9f39ef172a32d321251b08feba1a54a2d (diff) | |
download | qt-creator-7b41c76d92f50373c77cbb5fa64284100a3a4431.tar.gz |
QmlProfiler: Fix crash in qWarning
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/qmlprofiler/qmlprofilertool.cpp | 9 |
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(); |