diff options
author | Jan-Marek Glogowski <jan-marek.glogowski@extern.cib.de> | 2020-02-21 13:11:28 +0100 |
---|---|---|
committer | Jan-Marek Glogowski <glogow@fbihome.de> | 2020-02-21 20:03:51 +0100 |
commit | 813cde918338bccc4f711230616340cad2c1d4a0 (patch) | |
tree | 3e988d04bbe0c458064582299e6a57a6c664a567 /vcl/qt5/Qt5SvpGraphics.cxx | |
parent | 12d88808fbde933c0498c895ddb74700c263bf0f (diff) |
tdf#130831 Qt5 don't blit damage to empty image
This prevents the crash, but I'm not sure having an empty buffer
image at this point is correct. But it doesn't look like anything
is missing in the dialog and a crash is definitly worse.
Change-Id: I7d0330b4e4a7ca64655a51c226e425e53ba12118
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89203
Tested-by: Jenkins
Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
Diffstat (limited to 'vcl/qt5/Qt5SvpGraphics.cxx')
-rw-r--r-- | vcl/qt5/Qt5SvpGraphics.cxx | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/vcl/qt5/Qt5SvpGraphics.cxx b/vcl/qt5/Qt5SvpGraphics.cxx index 55de70b2a186..364cbb183475 100644 --- a/vcl/qt5/Qt5SvpGraphics.cxx +++ b/vcl/qt5/Qt5SvpGraphics.cxx @@ -81,6 +81,8 @@ void Qt5SvpGraphics::handleDamage(const tools::Rectangle& rDamagedRegion) QImage* pImage = static_cast<Qt5Graphics_Controls*>(m_pWidgetDraw.get())->getImage(); assert(pImage); + if (pImage->width() == 0 || pImage->height() == 0) + return; BitmapBuffer aBuffer; QImage2BitmapBuffer(*pImage, aBuffer); |