Skip to content

Commit 9a79c66

Browse files
committed
EditorManager: Fix crash on shutdown
Some plugins (Debugger) do a "delayed" shutdown, which triggers an event loop and the processing of async EditorArea "hidden" signals. The Debug mode is already deleted then, which leads to a crash when the "hidden" handler investigates the current mode. We don't need to do anything anymore when areas are hidden while shutting down, so just skip ahead in that case. Amends b716783 Change-Id: Iaf41750df213908ba1e5b19ceae418abea76ad58 Reviewed-by: Christian Stenger <[email protected]>
1 parent 7781e85 commit 9a79c66

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/plugins/coreplugin/editormanager/editormanager.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1863,6 +1863,8 @@ void EditorManagerPrivate::addEditorArea(EditorArea *area)
18631863
&EditorArea::hidden,
18641864
d,
18651865
[area = QPointer<EditorArea>(area)] {
1866+
if (ExtensionSystem::PluginManager::isShuttingDown())
1867+
return;
18661868
// The connection is queued, because the hiding might be very short term, e.g.
18671869
// when switching between Edit and Debug modes. Check if it is still hidden.
18681870
const auto isReallyVisibile = [](QWidget *w) {

0 commit comments

Comments
 (0)