From 64379b01f7555f664b74b36e130147ff1aaf0133 Mon Sep 17 00:00:00 2001 From: george82 Date: Mon, 5 Nov 2007 16:33:09 +0000 Subject: [PATCH] Small code improvements - added check for scale buffer in ScaledPixelBuffer::setScaleFilter(). git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@2367 3789f03b-4d11-0410-bbf8-ca57d06f2519 --- common/rfb/ScaledPixelBuffer.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/rfb/ScaledPixelBuffer.cxx b/common/rfb/ScaledPixelBuffer.cxx index e45274e4..cd373387 100644 --- a/common/rfb/ScaledPixelBuffer.cxx +++ b/common/rfb/ScaledPixelBuffer.cxx @@ -111,7 +111,7 @@ void ScaledPixelBuffer::setScaleFilter(unsigned int scaleFilterID_) { freeWeightTabs(); scaleFilters.makeWeightTabs(scaleFilterID, src_width, scaled_width, &xWeightTabs); scaleFilters.makeWeightTabs(scaleFilterID, src_height, scaled_height, &yWeightTabs); - if (scale != 100 && pf.depth > 0) scaleRect(Rect(0, 0, src_width, src_height)); + if (scale != 100 && pf.depth > 0 && scaled_data) scaleRect(Rect(0, 0, src_width, src_height)); } } -- 2.39.5