vcl/unx/kde5/KDE5SalGraphics.cxx | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-)
New commits: commit 42b3be24f058ce470db54232cc496d56e2fd774e Author: Katarina Behrens <katarina.behr...@cib.de> AuthorDate: Wed Sep 5 15:21:08 2018 +0200 Commit: Thorsten Behrens <thorsten.behr...@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.behr...@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() _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits