mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-06 10:00:40 +00:00
Unregister shortcuts when closing windows that registered shortcuts
* This prevents leaking for cases where new widgets are created (and the small chance a widget pointer could be re-used and cause serious problems), and multiple-registration errors for global shortcuts.
This commit is contained in:
@@ -585,6 +585,9 @@ ShaderViewer::~ShaderViewer()
|
||||
// don't want to async invoke while using 'this', so save the trace separately
|
||||
ShaderDebugTrace *trace = m_Trace;
|
||||
|
||||
// unregister any shortcuts on this window
|
||||
m_Ctx.GetMainWindow()->UnregisterShortcut(QString(), this);
|
||||
|
||||
m_Ctx.Replay().AsyncInvoke([trace](IReplayController *r) { r->FreeTrace(trace); });
|
||||
|
||||
if(m_CloseCallback)
|
||||
|
||||
Reference in New Issue
Block a user