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:
@@ -189,10 +189,16 @@ AppServer::_CreateDesktop(uid_t userID)
|
|||||||
try {
|
try {
|
||||||
desktop = new Desktop(userID);
|
desktop = new Desktop(userID);
|
||||||
|
|
||||||
desktop->Init();
|
status_t status = desktop->Init();
|
||||||
desktop->Run();
|
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;
|
delete desktop;
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user