[Libreoffice-commits] core.git: Branch 'libreoffice-6-4' - vcl/qt5

Jan-Marek Glogowski (via logerrit) logerrit at kemper.freedesktop.org
Sat Feb 22 09:06:32 UTC 2020


 vcl/qt5/Qt5SvpGraphics.cxx |    2 ++
 1 file changed, 2 insertions(+)

New commits:
commit 179322dff3fffa0980cbb246d93dd651e612170f
Author:     Jan-Marek Glogowski <jan-marek.glogowski at extern.cib.de>
AuthorDate: Fri Feb 21 13:11:28 2020 +0100
Commit:     Michael Weghorn <m.weghorn at posteo.de>
CommitDate: Sat Feb 22 10:06:02 2020 +0100

    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 at fbihome.de>
    (cherry picked from commit 813cde918338bccc4f711230616340cad2c1d4a0)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89140
    Reviewed-by: Michael Weghorn <m.weghorn at posteo.de>

diff --git a/vcl/qt5/Qt5SvpGraphics.cxx b/vcl/qt5/Qt5SvpGraphics.cxx
index fc58bbcfcc15..ec91049f1732 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);


More information about the Libreoffice-commits mailing list