WASM compositor, clear last mouse target if it is the removed window
m_lastMouseTargetWindow pointer may be kept even though the window has been removed. This leads to memory access problems. Change-Id: Ie83b607bf5a815540605671dd1d1ad37288074c5 Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
This commit is contained in:
parent
9329e4e8c7
commit
310aecc94a
@ -161,6 +161,8 @@ void QWasmCompositor::removeWindow(QWasmWindow *window)
|
||||
{
|
||||
m_requestUpdateWindows.remove(window);
|
||||
m_windowStack.removeWindow(window);
|
||||
if (m_lastMouseTargetWindow == window->window())
|
||||
m_lastMouseTargetWindow = nullptr;
|
||||
if (m_windowStack.topWindow())
|
||||
m_windowStack.topWindow()->requestActivateWindow();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user