From: george82 Date: Mon, 29 May 2006 13:57:39 +0000 (+0000) Subject: Added new exception rfb::UnsupportedPixelFormatException. X-Git-Tag: v0.0.90~384^2~273 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=2ac935ea9a5461bf97deb64510f6d93e64374be3;p=tigervnc.git Added new exception rfb::UnsupportedPixelFormatException. git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@599 3789f03b-4d11-0410-bbf8-ca57d06f2519 --- diff --git a/win/rfb_win32/ScaledDIBSectionBuffer.cxx b/win/rfb_win32/ScaledDIBSectionBuffer.cxx index be921f95..7f14cceb 100644 --- a/win/rfb_win32/ScaledDIBSectionBuffer.cxx +++ b/win/rfb_win32/ScaledDIBSectionBuffer.cxx @@ -40,6 +40,8 @@ ScaledDIBSectionBuffer::~ScaledDIBSectionBuffer() { void ScaledDIBSectionBuffer::setScale(int scale_) { if (scale_ == getScale()) return; + if (format.depth != 24) throw rfb::UnsupportedPixelFormatException(); + if (scale_ != 100) { scaling = true; if (!src_buffer) {