]> source.dussan.org Git - tigervnc.git/commitdiff
Added new exception rfb::UnsupportedPixelFormatException.
authorgeorge82 <george82@3789f03b-4d11-0410-bbf8-ca57d06f2519>
Mon, 29 May 2006 13:57:39 +0000 (13:57 +0000)
committergeorge82 <george82@3789f03b-4d11-0410-bbf8-ca57d06f2519>
Mon, 29 May 2006 13:57:39 +0000 (13:57 +0000)
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@599 3789f03b-4d11-0410-bbf8-ca57d06f2519

win/rfb_win32/ScaledDIBSectionBuffer.cxx

index be921f951a5f6bbedf120f9ed5801f9507b548b6..7f14cceb09e7894561f81127b126f9c60f783560 100644 (file)
@@ -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) {