From 2ac935ea9a5461bf97deb64510f6d93e64374be3 Mon Sep 17 00:00:00 2001 From: george82 Date: Mon, 29 May 2006 13:57:39 +0000 Subject: [PATCH] Added new exception rfb::UnsupportedPixelFormatException. git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@599 3789f03b-4d11-0410-bbf8-ca57d06f2519 --- win/rfb_win32/ScaledDIBSectionBuffer.cxx | 2 ++ 1 file changed, 2 insertions(+) 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) { -- 2.39.5