be_app could be NULL in BApplication's destructor, if the BApplication didn't initialize itself fully on construction. This fixes a crash when launching some already running application (i.e. print_server)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27413 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -233,10 +233,14 @@ BApplication::~BApplication()
|
|||||||
|
|
||||||
#ifndef RUN_WITHOUT_APP_SERVER
|
#ifndef RUN_WITHOUT_APP_SERVER
|
||||||
// tell app_server we're quitting...
|
// tell app_server we're quitting...
|
||||||
BPrivate::AppServerLink link;
|
if (be_app) {
|
||||||
link.StartMessage(B_QUIT_REQUESTED);
|
// be_app can be NULL here if the application fails to initialize
|
||||||
link.Flush();
|
// correctly. For example, if it's already running and it's set to
|
||||||
|
// exclusive launch.
|
||||||
|
BPrivate::AppServerLink link;
|
||||||
|
link.StartMessage(B_QUIT_REQUESTED);
|
||||||
|
link.Flush();
|
||||||
|
}
|
||||||
delete_port(fServerLink->SenderPort());
|
delete_port(fServerLink->SenderPort());
|
||||||
delete_port(fServerLink->ReceiverPort());
|
delete_port(fServerLink->ReceiverPort());
|
||||||
delete fServerLink;
|
delete fServerLink;
|
||||||
|
|||||||
Reference in New Issue
Block a user