Fix potential crash at shutdown
QWidget DTOR can trigger a focus change, which triggers DockRegistry::onFocusObjectChanged(), which would dereference the dockwidget
This commit is contained in:
@@ -260,6 +260,9 @@ void DockRegistry::registerDockWidget(DockWidgetBase *dock)
|
||||
|
||||
void DockRegistry::unregisterDockWidget(DockWidgetBase *dock)
|
||||
{
|
||||
if (m_focusedDockWidget == dock)
|
||||
m_focusedDockWidget = nullptr;
|
||||
|
||||
m_dockWidgets.removeOne(dock);
|
||||
maybeDelete();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user