Check for a valid screen manager in NativeIsAtTopLevel

This commit is contained in:
Henrik Rydgård committed 2018-05-26 17:50:37 +02:00
1 parent 09e85eb150
commit d35de81a76
1 file changed
+5
+5
View File
@@ -1004,6 +1004,11 @@ void NativeUpdate() {
}
bool NativeIsAtTopLevel() {
// This might need some synchronization?
if (!screenManager) {
ELOG("No screen manager active");
return false;
}
Screen *currentScreen = screenManager->topScreen();
if (currentScreen) {
bool top = currentScreen->isTopLevel();