diff options
author | Volker Hilsheimer <volker.hilsheimer@qt.io> | 2024-06-18 09:59:41 +0200 |
---|---|---|
committer | Volker Hilsheimer <volker.hilsheimer@qt.io> | 2024-06-18 15:12:13 +0200 |
commit | 8afac5e5ff8a590d95b4f648e26439796873e824 (patch) | |
tree | bfff2195cf4e4acf8aefe8997792761659a90220 /tools/qmlpreview | |
parent | 1ce1faafa4d3678c8f733cf8c65308cc3cc4d90c (diff) |
releaseItem ends up in code paths that emit signals and might activate
bindings or handlers, potentially leading to recursion. Since the
released item is deleted in releaseItem, this results in a dangling
pointer and potential crashes.
To prevent that, reset the currentItem pointer before we release it.
Add a helper function that encapsulates that before calling the (virtual
in case of QQuickItemView) releaseItem method.
Pick-to: 6.8 6.7 6.5
Fixes: QTBUG-122998
Change-Id: I96f2ea35a774cf3dae09e25342e177449a3980c3
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Reviewed-by: MohammadHossein Qanbari <mohammad.qanbari@qt.io>
Diffstat (limited to 'tools/qmlpreview')
0 files changed, 0 insertions, 0 deletions