QmlProfiler: Fix crash in qWarning

This commit is contained in:
Kai Koehne
2011-05-03 16:45:46 +02:00
parent b7f30ed9f3
commit 7b41c76d92

View File

@@ -431,8 +431,13 @@ void QmlProfilerTool::tryToConnect()
} else if (d->m_connectionAttempts == 50) { } else if (d->m_connectionAttempts == 50) {
d->m_connectionTimer.stop(); d->m_connectionTimer.stop();
d->m_connectionAttempts = 0; d->m_connectionAttempts = 0;
if (QmlProfilerPlugin::debugOutput) if (QmlProfilerPlugin::debugOutput) {
if (d->m_client) {
qWarning("QmlProfiler: Failed to connect: %s", qPrintable(d->m_client->errorString())); qWarning("QmlProfiler: Failed to connect: %s", qPrintable(d->m_client->errorString()));
} else {
qWarning("QmlProfiler: Failed to connect.");
}
}
emit connectionFailed(); emit connectionFailed();
} else { } else {
connectToClient(); connectToClient();