summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEirik Aavitsland <eirik.aavitsland@qt.io>2021-07-23 15:53:56 +0200
committerEirik Aavitsland <eirik.aavitsland@qt.io>2021-10-22 10:48:21 +0200
commit9378ba2ae857df7e21a384e514650823db2355c3 (patch)
treed8675981162f08603fe2ae57352e605c897b1117
parent7f345f2a1c8d9f60c60e8a9d8cc90729794bd2f1 (diff)
Improve fix for avoiding huge number of tiny dashes
Some pathological cases were not caught by the previous fix. Fixes: QTBUG-95239 Change-Id: I0337ee3923ff93ccb36c4d7b810a9c0667354cc5 Reviewed-by: Robert Löhning <robert.loehning@qt.io> (cherry picked from commit 6b400e3147dcfd8cc3a393ace1bd118c93762e0c) Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
-rw-r--r--src/gui/painting/qpaintengineex.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/painting/qpaintengineex.cpp b/src/gui/painting/qpaintengineex.cpp
index f04e3a498d..bd6bdf7be1 100644
--- a/src/gui/painting/qpaintengineex.cpp
+++ b/src/gui/painting/qpaintengineex.cpp
@@ -426,7 +426,7 @@ void QPaintEngineEx::stroke(const QVectorPath &path, const QPen &inPen)
patternLength *= pen.widthF();
if (qFuzzyIsNull(patternLength)) {
pen.setStyle(Qt::NoPen);
- } else if (extent / patternLength > 10000) {
+ } else if (qFuzzyIsNull(extent) || extent / patternLength > 10000) {
// approximate stream of tiny dashes with semi-transparent solid line
pen.setStyle(Qt::SolidLine);
QColor color(pen.color());