diff options
author | Eirik Aavitsland <eirik.aavitsland@qt.io> | 2019-04-04 10:53:06 +0200 |
---|---|---|
committer | Eirik Aavitsland <eirik.aavitsland@qt.io> | 2019-04-25 06:06:45 +0000 |
commit | 8f8267f00bfa0d1716e38358ecc0fafff1d9df14 (patch) | |
tree | 4723cf0ea74afa27e4d901406ab8847549da19a2 /src/gui/painting/qstroker_p.h | |
parent | f2b5baf9d0b723b721d9cb7c60a3c04afe904d4f (diff) |
Avoid hanging on painting dashed lines with non-finite coordinates
The dash stroker did not check for inf/nan coordinates.
Fixes: QTBUG-47887
Change-Id: I1e696cd15cc37d8fcb6a464cac3da33c3a8b95c2
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'src/gui/painting/qstroker_p.h')
-rw-r--r-- | src/gui/painting/qstroker_p.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/gui/painting/qstroker_p.h b/src/gui/painting/qstroker_p.h index 1a7c184e1a..59e4cc6a7b 100644 --- a/src/gui/painting/qstroker_p.h +++ b/src/gui/painting/qstroker_p.h @@ -104,6 +104,7 @@ struct qfixed2d qfixed x; qfixed y; + bool isFinite() { return qIsFinite(x) && qIsFinite(y); } bool operator==(const qfixed2d &other) const { return qFuzzyCompare(x, other.x) && qFuzzyCompare(y, other.y); } }; |