diff options
author | Paul Olav Tvete <paul.tvete@nokia.com> | 2010-03-10 12:37:36 (GMT) |
---|---|---|
committer | Paul Olav Tvete <paul.tvete@nokia.com> | 2010-03-10 13:10:52 (GMT) |
commit | fdf85116102ed03a56dae3947f4251bf0f889f33 (patch) | |
tree | 8b1124166d039c443991da43a880f1212cfa7887 /src/plugins/gfxdrivers/vnc | |
parent | 1f88e7df38aa890cf893cf7f5b60546dbd922bdf (diff) | |
download | Qt-fdf85116102ed03a56dae3947f4251bf0f889f33.zip Qt-fdf85116102ed03a56dae3947f4251bf0f889f33.tar.gz Qt-fdf85116102ed03a56dae3947f4251bf0f889f33.tar.bz2 |
Do qFatal() on unsupported screen format instead of crashing later
Task-number: Related to QTBUG-5117
Reviewed-by: Jørgen Lind
Diffstat (limited to 'src/plugins/gfxdrivers/vnc')
-rw-r--r-- | src/plugins/gfxdrivers/vnc/qscreenvnc_qws.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/plugins/gfxdrivers/vnc/qscreenvnc_qws.cpp b/src/plugins/gfxdrivers/vnc/qscreenvnc_qws.cpp index e78fec1..f5ad70c 100644 --- a/src/plugins/gfxdrivers/vnc/qscreenvnc_qws.cpp +++ b/src/plugins/gfxdrivers/vnc/qscreenvnc_qws.cpp @@ -2163,6 +2163,9 @@ bool QVNCScreen::connect(const QString &displaySpec) if (QScreenDriverFactory::keys().contains(driver, Qt::CaseInsensitive)) { const int id = getDisplayId(dspec); QScreen *s = qt_get_screen(id, dspec.toLatin1().constData()); + if (s->pixelFormat() == QImage::Format_Indexed8 + || s->pixelFormat() == QImage::Format_Invalid && s->depth() == 8) + qFatal("QVNCScreen: unsupported screen format"); setScreen(s); } else { // create virtual screen #if Q_BYTE_ORDER == Q_BIG_ENDIAN |