From dbbc370400922cf9963a9a80ac0d1396450e8ef3 Mon Sep 17 00:00:00 2001 From: Paul Olav Tvete Date: Mon, 21 Jun 2010 14:31:36 +0200 Subject: Copied VNC crash fixes from QWS Copied from commit 71b840ef81a9 and commit 57fcc060f --- src/plugins/platforms/vnc/qvncserver.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/plugins/platforms/vnc/qvncserver.cpp b/src/plugins/platforms/vnc/qvncserver.cpp index fb6eaa8..288d1bc 100644 --- a/src/plugins/platforms/vnc/qvncserver.cpp +++ b/src/plugins/platforms/vnc/qvncserver.cpp @@ -889,7 +889,7 @@ void QVNCServer::clientCutText() { QRfbClientCutText ev; - if (ev.read(client)) { + if (cutTextPending == 0 && ev.read(client)) { cutTextPending = ev.length; if (!cutTextPending) handleMsg = false; @@ -1317,7 +1317,7 @@ void QVNCServer::convertPixels(char *dst, const char *src, int count) const } if (count & 0x1) { const quint16 *src16 = reinterpret_cast(src); - dst32[count - 1] = qt_conv16ToRgb(src16[count - 1]); + *dst32 = qt_conv16ToRgb(src16[count - 1]); } return; #endif -- cgit v0.12