[Libreoffice-commits] core.git: vcl/unx
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Wed Sep 5 17:51:25 UTC 2018
vcl/unx/kde5/KDE5SalGraphics.cxx | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
New commits:
commit 42b3be24f058ce470db54232cc496d56e2fd774e
Author: Katarina Behrens <Katarina.Behrens at cib.de>
AuthorDate: Wed Sep 5 15:21:08 2018 +0200
Commit: Thorsten Behrens <Thorsten.Behrens at CIB.de>
CommitDate: Wed Sep 5 19:50:58 2018 +0200
Avoid crash in printer dlg due to empty QImage
Crash seems to be limited to vertical FixedLine control type. This is
just a band-aid, need to find out what's wrong with drawing this specific
control. Other control don't seem to be affected
Change-Id: Ie04bc04bbdf95920d62d43ac7874e7dba1441a4c
Reviewed-on: https://gerrit.libreoffice.org/60039
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>
diff --git a/vcl/unx/kde5/KDE5SalGraphics.cxx b/vcl/unx/kde5/KDE5SalGraphics.cxx
index 9f177556915b..583edf6e8e6c 100644
--- a/vcl/unx/kde5/KDE5SalGraphics.cxx
+++ b/vcl/unx/kde5/KDE5SalGraphics.cxx
@@ -25,11 +25,14 @@
static void QImage2BitmapBuffer(QImage* pImg, BitmapBuffer* pBuf)
{
- pBuf->mnWidth = pImg->width();
- pBuf->mnHeight = pImg->height();
- pBuf->mnBitCount = getFormatBits(pImg->format());
- pBuf->mpBits = pImg->bits();
- pBuf->mnScanlineSize = pImg->bytesPerLine();
+ if (pImg->width() != 0 && pImg->height() != 0)
+ {
+ pBuf->mnWidth = pImg->width();
+ pBuf->mnHeight = pImg->height();
+ pBuf->mnBitCount = getFormatBits(pImg->format());
+ pBuf->mpBits = pImg->bits();
+ pBuf->mnScanlineSize = pImg->bytesPerLine();
+ }
}
KDE5SalGraphics::KDE5SalGraphics()
More information about the Libreoffice-commits
mailing list