From dc3ebdec6c384a706f5f85261c03312fd48353df Mon Sep 17 00:00:00 2001 From: Adi Oanca Date: Sat, 17 Jan 2004 16:35:00 +0000 Subject: [PATCH] fixed the problems Ingo pointed out git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6115 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/kits/app/Application.cpp | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/src/kits/app/Application.cpp b/src/kits/app/Application.cpp index 0f5c8196cc..64aa68fbd0 100644 --- a/src/kits/app/Application.cpp +++ b/src/kits/app/Application.cpp @@ -60,6 +60,7 @@ // Local Includes -------------------------------------------------------------- // Local Defines --------------------------------------------------------------- +#define RUN_WITHOUT_REGISTRAR // Globals --------------------------------------------------------------------- BApplication* be_app = NULL; @@ -220,11 +221,8 @@ BApplication::BApplication(const char* signature, status_t* error) //------------------------------------------------------------------------------ BApplication::~BApplication() { - // unregister from the roster - BRoster::Private().RemoveApp(Team()); - // tell all loopers(usualy windows) to quit. Also, wait for them. - BLooper* Looper = NULL; + BWindow* window = NULL; BList looperList; { using namespace BPrivate; @@ -235,14 +233,17 @@ BApplication::~BApplication() for (int32 i = 0; i < looperList.CountItems(); i++) { - Looper = dynamic_cast((BLooper*)looperList.ItemAt(i)); - if (Looper && Looper != this) + window = dynamic_cast((BLooper*)looperList.ItemAt(i)); + if (window) { - Looper->Lock(); - Looper->Quit(); + window->Lock(); + window->Quit(); } } + // unregister from the roster + BRoster::Private().RemoveApp(Team()); + // tell app_server we're quiting... PortLink link(fServerFrom); link.SetOpCode(B_QUIT_REQUESTED);