summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesus Fernandez <jesus.fernandez@qt.io>2017-09-20 15:39:35 +0200
committerJesus Fernandez <Jesus.Fernandez@qt.io>2017-09-20 14:06:06 +0000
commit7cd51e57b95bd91f698c28ad76e31be3fe4c506e (patch)
tree52e391928b91babd1f9a39e0d5d7614974875c6b
parentea8884c16aa9919a9cf3a8b85bf9463dc53fb82c (diff)
Fix NULL data handling
It fixes the handling of NULL data. Before this patch, the wrong byte array was used to check if the buffer is NULL. Change-Id: Ia635e11a9ac33a157c28d4af99f625e33e8fa128 Reviewed-by: MÃ¥rten Nordheim <marten.nordheim@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
-rw-r--r--src/plugins/platforms/webgl/qwebglwebsocketserver.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/platforms/webgl/qwebglwebsocketserver.cpp b/src/plugins/platforms/webgl/qwebglwebsocketserver.cpp
index 6344d2d..e3a0642 100644
--- a/src/plugins/platforms/webgl/qwebglwebsocketserver.cpp
+++ b/src/plugins/platforms/webgl/qwebglwebsocketserver.cpp
@@ -197,7 +197,7 @@ void QWebGLWebSocketServer::sendMessage(QWebSocket *socket,
break;
case QVariant::ByteArray: {
const auto byteArray = value.toByteArray();
- if (data.isNull())
+ if (byteArray.isNull())
stream << (quint8)'n';
else
stream << (quint8)'x' << byteArray;