Commit 7b41c76d authored by Kai Koehne's avatar Kai Koehne

QmlProfiler: Fix crash in qWarning

parent b7f30ed9
......@@ -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();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment