Errors in Desktop::Init() and Desktop::Run() are now taken into account correctly.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17233 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
6d5488e18a
commit
583b05be46
@ -189,10 +189,16 @@ AppServer::_CreateDesktop(uid_t userID)
|
||||
try {
|
||||
desktop = new Desktop(userID);
|
||||
|
||||
desktop->Init();
|
||||
desktop->Run();
|
||||
status_t status = desktop->Init();
|
||||
if (status == B_OK) {
|
||||
if (!desktop->Run())
|
||||
status = B_ERROR;
|
||||
}
|
||||
if (status == B_OK && !fDesktops.AddItem(desktop))
|
||||
status = B_NO_MEMORY;
|
||||
|
||||
if (!fDesktops.AddItem(desktop)) {
|
||||
if (status < B_OK) {
|
||||
fprintf(stderr, "Cannot initialize Desktop object: %s\n", strerror(status));
|
||||
delete desktop;
|
||||
return NULL;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user