summaryrefslogtreecommitdiff
path: root/vcl/qt5
diff options
context:
space:
mode:
authorJan-Marek Glogowski <glogow@fbihome.de>2020-10-27 16:41:30 +0100
committerJan-Marek Glogowski <glogow@fbihome.de>2020-10-27 20:19:23 +0100
commitfeb5985b463974476985dee83376067941d77da0 (patch)
tree243e65d31e4aa1fdc34149e2826fd199f55b99da /vcl/qt5
parentaadd34f7fb793308c3fa4049b9eccc924887ddb4 (diff)
tdf#137804 Qt5 don't paint empty strings
For a test I added a SAL_WARN, but that created many more debug messages then expected, just when opening the print dialog. So this just handles the crash like the CairoTextRender variant of DrawTextLayout does, by returning early. Change-Id: Ie5b58ebbba02dace0e777b60fcbc3b9f46ea9d66 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104893 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
Diffstat (limited to 'vcl/qt5')
-rw-r--r--vcl/qt5/Qt5Graphics_Text.cxx4
1 files changed, 4 insertions, 0 deletions
diff --git a/vcl/qt5/Qt5Graphics_Text.cxx b/vcl/qt5/Qt5Graphics_Text.cxx
index 431ab4e32f3d..abf71b7ec7e9 100644
--- a/vcl/qt5/Qt5Graphics_Text.cxx
+++ b/vcl/qt5/Qt5Graphics_Text.cxx
@@ -317,6 +317,10 @@ void Qt5Graphics::DrawTextLayout(const GenericSalLayout& rLayout)
positions.push_back(QPointF(aPos.X(), aPos.Y()));
}
+ // seems to be common to try to layout an empty string...
+ if (positions.empty())
+ return;
+
if (nOrientation)
pQt5Layout->SetOrientation(nOrientation);