diff --git a/src/kits/app/Application.cpp b/src/kits/app/Application.cpp index bf04e2f4e9..840651e6eb 100644 --- a/src/kits/app/Application.cpp +++ b/src/kits/app/Application.cpp @@ -60,7 +60,6 @@ #include #include - using namespace BPrivate; // Globals --------------------------------------------------------------------- @@ -1161,15 +1160,15 @@ bool BApplication::window_quit_loop(bool quitFilePanels, bool force) { BList looperList; - BObjectLocker listLock(gLooperList); - if (listLock.IsLocked()) - gLooperList.GetLooperList(&looperList); + { + BObjectLocker listLock(gLooperList); + if (listLock.IsLocked()) + gLooperList.GetLooperList(&looperList); + } for (int32 i = looperList.CountItems(); i-- > 0; ) { BWindow *window = dynamic_cast((BLooper *)looperList.ItemAt(i)); - // ToDo: windows in this list may already have been closed in the mean time?! - if (window != NULL && window->Lock()) { if ((window->IsFilePanel() && !quitFilePanels) || (!force && !window->QuitRequested())) { @@ -1181,7 +1180,6 @@ BApplication::window_quit_loop(bool quitFilePanels, bool force) window->Quit(); } } - return true; }