app_server: perform NULL check before use
Fixes #16610. Change-Id: Ic377a2faef7279f607298b3b80bc44bc1c6aae36 Reviewed-on: https://review.haiku-os.org/c/haiku/+/3401 Reviewed-by: Jérôme Duval <jerome.duval@gmail.com> Reviewed-by: Axel Dörfler <axeld@pinc-software.de>
This commit is contained in:
parent
2982d9819f
commit
be3fde6d02
@ -514,15 +514,15 @@ Desktop::Init()
|
||||
fVirtualScreen.SetConfiguration(*this,
|
||||
fWorkspaces[0].CurrentScreenConfiguration());
|
||||
|
||||
float brightness = fWorkspaces[0].StoredScreenConfiguration().Brightness(0);
|
||||
if (brightness > 0)
|
||||
HWInterface()->SetBrightness(brightness);
|
||||
|
||||
if (fVirtualScreen.HWInterface() == NULL) {
|
||||
debug_printf("Could not initialize graphics output. Exiting.\n");
|
||||
return B_ERROR;
|
||||
}
|
||||
|
||||
float brightness = fWorkspaces[0].StoredScreenConfiguration().Brightness(0);
|
||||
if (brightness > 0)
|
||||
HWInterface()->SetBrightness(brightness);
|
||||
|
||||
fVirtualScreen.HWInterface()->MoveCursorTo(
|
||||
fVirtualScreen.Frame().Width() / 2,
|
||||
fVirtualScreen.Frame().Height() / 2);
|
||||
|
Loading…
x
Reference in New Issue
Block a user