fixed the problems Ingo pointed out
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6115 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -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*>((BLooper*)looperList.ItemAt(i));
|
||||
if (Looper && Looper != this)
|
||||
window = dynamic_cast<BWindow*>((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);
|
||||
|
||||
Reference in New Issue
Block a user