Debugger: Fix #10764 (again).

- When terminating TeamWindow, if InspectorWindow is still active,
  ensure that it's also quit at that point. Otherwise, it was
  possible for the inspector window to receive the quit message from
  the main application's shutdown process after TeamDebugger had
  already been terminated, leading to a crash when the window tried to
  release its current memory block, since the block manager had
  already been destroyed by that point.
This commit is contained in:
Rene Gollent 2014-06-16 23:31:04 -04:00
parent dee948553c
commit 94aa0c624b

View File

@ -1,6 +1,6 @@
/*
* Copyright 2009-2012, Ingo Weinhold, ingo_weinhold@gmx.de.
* Copyright 2010-2013, Rene Gollent, rene@gollent.com.
* Copyright 2010-2014, Rene Gollent, rene@gollent.com.
* Distributed under the terms of the MIT License.
*/
@ -151,6 +151,11 @@ TeamWindow::~TeamWindow()
fStackTraceView->UnsetListener();
if (fSourceView != NULL)
fSourceView->UnsetListener();
if (fInspectorWindow != NULL) {
BMessenger messenger(fInspectorWindow);
if (messenger.LockTarget())
fInspectorWindow->Quit();
}
fTeam->RemoveListener(this);