When the swap chain is destroyed, we reset the swapchain’s layer (set it to nullptr). However we were not resetting the proxyData which would still point to the window’s (NSView) layer. This starts to become a problem in the cases where the swapchain’s associated QWindow is closed (NSView gets destroyed) and reopened (a new NSView will be created) because when the swap chain is recreated again, since the proxyData already exists and points to the invalid old layer, QRhi::updateSwapChainProxyData is never called. This led to an invalid value being assigned to the swap chain’s layer. To fix the issue, make sure to reset the swapchain’s proxy data when destroy() is called. Task-number: QTBUG-113498 Pick-to: 6.5 Change-Id: I02996ecf69ad9d183cac31c9188717ec36742531 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> (cherry picked from commit 948b93a847e1d6b78b5eee039281b3cd078fbabe) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit b2eb82a42f3525db0f038b248312ba19e385371e)
…
…
…
Description
Languages
C++
84.3%
HTML
4.9%
C
3.9%
CMake
3.6%
Objective-C++
2%
Other
0.8%