* Creating a Desktop can fail, in which case the app_server should not return B_OK,
and an invalid desktop message port... * Desktop::Init() now checks if VirtualScreen::fHWInterface is valid, and exits if not. This can happen if you don't have a graphics driver, and turn on on-screen debug mode in the boot loader (such that you already see the messages from the boot loader). git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24371 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
ce099c4a14
commit
092c62f0f1
@ -188,8 +188,12 @@ AppServer::_DispatchMessage(int32 code, BPrivate::LinkReceiver& msg)
|
||||
}
|
||||
|
||||
BPrivate::LinkSender reply(replyPort);
|
||||
reply.StartMessage(B_OK);
|
||||
reply.Attach<port_id>(desktop->MessagePort());
|
||||
if (desktop != NULL) {
|
||||
reply.StartMessage(B_OK);
|
||||
reply.Attach<port_id>(desktop->MessagePort());
|
||||
} else
|
||||
reply.StartMessage(B_ERROR);
|
||||
|
||||
reply.Flush();
|
||||
break;
|
||||
}
|
||||
|
@ -385,6 +385,11 @@ Desktop::Init()
|
||||
// TODO: temporary workaround, fActiveScreen will be removed
|
||||
fActiveScreen = fVirtualScreen.ScreenAt(0);
|
||||
|
||||
if (fVirtualScreen.HWInterface() == NULL) {
|
||||
debug_printf("Could not initialize graphics output. Exiting.\n");
|
||||
return B_ERROR;
|
||||
}
|
||||
|
||||
fVirtualScreen.HWInterface()->MoveCursorTo(fVirtualScreen.Frame().Width() / 2,
|
||||
fVirtualScreen.Frame().Height() / 2);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user