Debugger: Make sure client list is protected by mutex
authorKai Koehne <kai.koehne@digia.com>
Fri, 17 May 2013 13:15:31 +0000 (15:15 +0200)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Fri, 24 May 2013 13:04:26 +0000 (15:04 +0200)
So far we didn't protect this access.

Change-Id: Id738453db5e655371fa2fbf88f81cab6c0af466f
Reviewed-by: Aurindam Jana <aurindam.jana@digia.com>

src/qml/debugger/qqmldebugserver.cpp

index dcb5539..53ad157 100644 (file)
@@ -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<float> pluginVersions;