diff options
author | Eirik Aavitsland <eirik.aavitsland@qt.io> | 2019-06-19 16:35:28 +0200 |
---|---|---|
committer | Eirik Aavitsland <eirik.aavitsland@qt.io> | 2019-06-19 16:47:19 +0200 |
commit | 2ce4a9f48705095669cb74c8de9d8a72f9d49b0e (patch) | |
tree | cdd6fd46f7f536b4d7d05aa4e34bfabf4793e3cc /tests | |
parent | 71ed62bc4c5bff26af1d822bfd89f5fbb87c4094 (diff) |
Fix crash in QPainterPath::reserve()
Function did not handle default-constructed (null d_ptr) path correctly.
Fixes: QTBUG-76516
Change-Id: I2925d4306f7fce34ece6739b18a8e275e7970837
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/gui/painting/qpainterpath/tst_qpainterpath.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/auto/gui/painting/qpainterpath/tst_qpainterpath.cpp b/tests/auto/gui/painting/qpainterpath/tst_qpainterpath.cpp index 69c961c1a1..c90348e91a 100644 --- a/tests/auto/gui/painting/qpainterpath/tst_qpainterpath.cpp +++ b/tests/auto/gui/painting/qpainterpath/tst_qpainterpath.cpp @@ -189,6 +189,10 @@ void tst_QPainterPath::reserveAndCapacity() p.reserve(0); QVERIFY(p.capacity() >= 1000); + + QPainterPath p2; + p2.reserve(10); + QVERIFY(p.capacity() >= 10); } Q_DECLARE_METATYPE(QPainterPath) |