From: Kai Koehne Date: Fri, 17 May 2013 13:15:31 +0000 (+0200) Subject: Debugger: Make sure client list is protected by mutex X-Git-Url: http://git.silmor.de/gitweb/?a=commitdiff_plain;h=2653e79f1822dfa3c1516f518df77e94adf8bf82;p=konrad%2Fqtdeclarative.git Debugger: Make sure client list is protected by mutex So far we didn't protect this access. Change-Id: Id738453db5e655371fa2fbf88f81cab6c0af466f Reviewed-by: Aurindam Jana --- diff --git a/src/qml/debugger/qqmldebugserver.cpp b/src/qml/debugger/qqmldebugserver.cpp index dcb5539..53ad157 100644 --- a/src/qml/debugger/qqmldebugserver.cpp +++ b/src/qml/debugger/qqmldebugserver.cpp @@ -417,10 +417,13 @@ void QQmlDebugServer::receiveMessage(const QByteArray &message) if (s_dataStreamVersion > QDataStream().version()) s_dataStreamVersion = QDataStream().version(); } + // Send the hello answer immediately, since it needs to arrive before // the plugins below start sending messages. + QByteArray helloAnswer; { + QReadLocker readPluginsLock(&d->pluginsLock); QQmlDebugStream out(&helloAnswer, QIODevice::WriteOnly); QStringList pluginNames; QList pluginVersions;