From 94aa0c624b4689a4676236f06c43273ffe40a5c9 Mon Sep 17 00:00:00 2001 From: Rene Gollent Date: Mon, 16 Jun 2014 23:31:04 -0400 Subject: [PATCH] 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. --- .../debugger/user_interface/gui/team_window/TeamWindow.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/apps/debugger/user_interface/gui/team_window/TeamWindow.cpp b/src/apps/debugger/user_interface/gui/team_window/TeamWindow.cpp index de8cda1b5a..6bab5d7e9a 100644 --- a/src/apps/debugger/user_interface/gui/team_window/TeamWindow.cpp +++ b/src/apps/debugger/user_interface/gui/team_window/TeamWindow.cpp @@ -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);