forked from qt-creator/qt-creator
QmlProfiler: Fix crash in qWarning
This commit is contained in:
@@ -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();
|
||||
|
Reference in New Issue
Block a user