From 3a7e4add3a11bd305385ae0be8cd04abb37243dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mart=C3=ADn=20Lucas=20Golini?= Date: Tue, 9 Sep 2025 00:01:50 -0300 Subject: [PATCH] Forgot to stash the debugger crash fix. --- src/tools/ecode/plugins/debugger/debuggerclientlistener.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/tools/ecode/plugins/debugger/debuggerclientlistener.cpp b/src/tools/ecode/plugins/debugger/debuggerclientlistener.cpp index f30d2550d..e83b0e254 100644 --- a/src/tools/ecode/plugins/debugger/debuggerclientlistener.cpp +++ b/src/tools/ecode/plugins/debugger/debuggerclientlistener.cpp @@ -497,6 +497,8 @@ void DebuggerClientListener::scopes( const int /*frameId*/, std::vector&& uiVars->removeActionsByTag( SCOPES_UI_HASH ); uiVars->runOnMainThread( [this, uiVars] { + // Reset selection given that the VariablesModel can end up doing an use-after-free + uiVars->getSelection().clear(); auto model = uiVars->getModel(); size_t total = model->rowCount(); for ( size_t i = 0; i < total; i++ ) {