From 33be4c0f6949a57ff0cd3ef1c5ce9e32ffc91910 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Fri, 11 Jul 2014 14:10:51 +0100 Subject: return early for empty bitmap Change-Id: I768ffe9dc1226bbcca706e0c56c6103e043b2401 --- cui/source/dialogs/colorpicker.cxx | 3 +++ 1 file changed, 3 insertions(+) (limited to 'cui') diff --git a/cui/source/dialogs/colorpicker.cxx b/cui/source/dialogs/colorpicker.cxx index ab32c51e192a..cfe668bd2ea0 100644 --- a/cui/source/dialogs/colorpicker.cxx +++ b/cui/source/dialogs/colorpicker.cxx @@ -358,6 +358,9 @@ void ColorFieldControl::UpdateBitmap() const sal_Int32 nWidth = aSize.Width(); const sal_Int32 nHeight = aSize.Height(); + if (nWidth == 0 || nHeight == 0) + return; + if( !mpBitmap ) { mpBitmap = new Bitmap( aSize, 24 ); -- cgit