summaryrefslogtreecommitdiff
path: root/vcl/source/window/paint.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'vcl/source/window/paint.cxx')
-rw-r--r--vcl/source/window/paint.cxx6
1 files changed, 5 insertions, 1 deletions
diff --git a/vcl/source/window/paint.cxx b/vcl/source/window/paint.cxx
index 6fd447cbce70..7d031fcc1b2a 100644
--- a/vcl/source/window/paint.cxx
+++ b/vcl/source/window/paint.cxx
@@ -1218,6 +1218,10 @@ void Window::LogicInvalidate(const tools::Rectangle* pRectangle)
if (comphelper::LibreOfficeKit::isDialogPainting() || !comphelper::LibreOfficeKit::isActive())
return;
+ Size aSize = GetSizePixel();
+ if (aSize.getWidth() <= 0 || aSize.getHeight() <= 0)
+ return;
+
if (const vcl::ILibreOfficeKitNotifier* pNotifier = GetLOKNotifier())
{
// In case we are routing the window, notify the client
@@ -1226,7 +1230,7 @@ void Window::LogicInvalidate(const tools::Rectangle* pRectangle)
aPayload.push_back(std::make_pair(OString("rectangle"), pRectangle->toString()));
else
{
- const tools::Rectangle aRect(Point(0, 0), GetSizePixel());
+ const tools::Rectangle aRect(Point(0, 0), aSize);
aPayload.push_back(std::make_pair(OString("rectangle"), aRect.toString()));
}