summaryrefslogtreecommitdiff
path: root/cui
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-07-11 14:10:51 +0100
committerCaolán McNamara <caolanm@redhat.com>2014-07-11 15:38:22 +0100
commit33be4c0f6949a57ff0cd3ef1c5ce9e32ffc91910 (patch)
treeba41ef1cdf79f95635de67d0e9f50cc3bf3f62c3 /cui
parent46d9724369ba4f248eab0133d396bd8f6a4453c6 (diff)
return early for empty bitmap
Change-Id: I768ffe9dc1226bbcca706e0c56c6103e043b2401
Diffstat (limited to 'cui')
-rw-r--r--cui/source/dialogs/colorpicker.cxx3
1 files changed, 3 insertions, 0 deletions
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 );