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 be921f9..7f14cce 100644
--- a/win/rfb_win32/ScaledDIBSectionBuffer.cxx
+++ b/win/rfb_win32/ScaledDIBSectionBuffer.cxx
@@ -40,6 +40,8 @@
 void ScaledDIBSectionBuffer::setScale(int scale_) {
   if (scale_ == getScale()) return;
 
+  if (format.depth != 24) throw rfb::UnsupportedPixelFormatException();
+
   if (scale_ != 100) {
     scaling = true;
     if (!src_buffer) {