summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorLuboš Luňák <l.lunak@collabora.com>2019-10-25 15:17:56 +0200
committerLuboš Luňák <l.lunak@collabora.com>2019-11-27 09:55:12 +0100
commita09c5a0018664b0abb7ff142404fd884d282e85f (patch)
treea89c047f3c875728b885f0e3d8d924b72e006cdd /vcl
parent9043a45c8321ee2736ba1ec9970d369e851f2c86 (diff)
skip text drawing if there is nothing to draw
If the rectangle is empty, there is nothing to draw. This also avoids problems with WinSalVirtualDevice::ImplCreateVirDevBitmap() calling CreateDIBSection() with zero dimensions. Change-Id: I3a56e64fc32cfb855443f4ab665d53604d724d9b
Diffstat (limited to 'vcl')
-rw-r--r--vcl/win/gdi/winlayout.cxx2
1 files changed, 2 insertions, 0 deletions
diff --git a/vcl/win/gdi/winlayout.cxx b/vcl/win/gdi/winlayout.cxx
index 906f8a35349b..06189c6a7643 100644
--- a/vcl/win/gdi/winlayout.cxx
+++ b/vcl/win/gdi/winlayout.cxx
@@ -593,6 +593,8 @@ void WinSalGraphics::DrawTextLayout(const GenericSalLayout& rLayout)
tools::Rectangle aRect;
rLayout.GetBoundRect(aRect);
+ if( aRect.IsEmpty())
+ return;
pImpl->PreDrawText();