summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/plugins/gfxdrivers/vnc/qscreenvnc_qws.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/gfxdrivers/vnc/qscreenvnc_qws.cpp b/src/plugins/gfxdrivers/vnc/qscreenvnc_qws.cpp
index f5ad70c..e0a365b 100644
--- a/src/plugins/gfxdrivers/vnc/qscreenvnc_qws.cpp
+++ b/src/plugins/gfxdrivers/vnc/qscreenvnc_qws.cpp
@@ -1481,7 +1481,7 @@ void QVNCServer::convertPixels(char *dst, const char *src, int count) const
}
if (count & 0x1) {
const quint16 *src16 = reinterpret_cast<const quint16*>(src);
- dst32[count - 1] = qt_conv16ToRgb(src16[count - 1]);
+ *dst32 = qt_conv16ToRgb(src16[count - 1]);
}
return;
#endif
@@ -2038,7 +2038,7 @@ void QVNCServer::discardClient()
delete qvnc_cursor;
qvnc_cursor = 0;
#endif
- if (!qvnc_screen->screen() && !qvnc_screen->d_ptr->noDisablePainting)
+ if (!qvnc_screen->screen() && !qvnc_screen->d_ptr->noDisablePainting && QWSServer::instance())
QWSServer::instance()->enablePainting(false);
}