diff options
| author | Ahmed El Khazari <ahmed.el.khazari@qt.io> | 2025-08-11 07:54:51 +0300 |
|---|---|---|
| committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2025-08-14 12:46:47 +0000 |
| commit | e205d6b2acf23b76ec80277d3add3851210683be (patch) | |
| tree | 6ca62eb125dc00ae5b9ac738dd0c69f34577819d /src/corelib/kernel/qmetaobject.cpp | |
| parent | 9da26f935ecb66f874f3e7e92688aeeaefdc7bee (diff) | |
Android: Fix crash when parent window is detached but view reference remains
This commit addresses a crash that occurs when the parent window is
destroyed while the view reference is still held. The crash happens when
the callback onAttachedToWindow is triggered and the
QuickView.createQuickView() function is called in native code. In this
scenario, the view reference is still pointing to the previous QuickView
whose parent has already been cleared, causing the crash.
To fix this, we reset the reference to 0 when the parent is deleted or
destroyed. This ensures that when onAttachedToWindow is called again,
the view is properly recreated after its underlying window has been
destroyed.
Pick-to: 6.9 6.9.2 6.8
Fixes: QTBUG-138922
Change-Id: Ia39eb83b58af19cd9b881915215b2be2adcfee49
(cherry picked from commit 8194e979fc58f71244f625f320a797d4550524c9)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'src/corelib/kernel/qmetaobject.cpp')
0 files changed, 0 insertions, 0 deletions
