diff options
| author | Santhosh Kumar <santhosh.kumar.selvaraj@qt.io> | 2024-11-08 14:27:36 +0100 |
|---|---|---|
| committer | Santhosh Kumar <santhosh.kumar.selvaraj@qt.io> | 2024-11-12 19:54:33 +0100 |
| commit | b0c5efc22a10c51502892d95fe86a367b80aa678 (patch) | |
| tree | 7eafbd5400deb615623fb1ac944d85f50656cfe0 /src/quick/items/qquicktableview.cpp | |
| parent | f9d82816e6f1affd0fb388a54a2c49e38281abd9 (diff) | |
Reset section drag handler to nullptr in the table view
The section drag handler in the table view can sometimes leads to crash
with invalid reference. Its better that we reset the state of the drag
handler to nullptr.
Pick-to: 6.8
Change-Id: I75a10bea0f98e853a728d8376f3de78ecbc33d79
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Diffstat (limited to 'src/quick/items/qquicktableview.cpp')
| -rw-r--r-- | src/quick/items/qquicktableview.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/quick/items/qquicktableview.cpp b/src/quick/items/qquicktableview.cpp index a8f7074632..fa0746f48c 100644 --- a/src/quick/items/qquicktableview.cpp +++ b/src/quick/items/qquicktableview.cpp @@ -7387,8 +7387,10 @@ void QQuickTableViewPrivate::initSectionDragHandler(Qt::Orientation orientation) void QQuickTableViewPrivate::destroySectionDragHandler() { - if (sectionDragHandler) + if (sectionDragHandler) { delete sectionDragHandler; + sectionDragHandler = nullptr; + } } void QQuickTableViewPrivate::initializeIndexMapping() |
