main: assert that startup screen pointer is not null

This commit is contained in:
Andrzej Rybczak
2015-05-09 16:08:32 +02:00
parent c540c5afba
commit 7d5c5cb20e

View File

@@ -135,7 +135,11 @@ int main(int argc, char **argv)
// go to startup screen
if (Config.startup_screen_type != myScreen->type())
toScreen(Config.startup_screen_type)->switchTo();
{
auto startup_screen = toScreen(Config.startup_screen_type);
assert(startup_screen != nullptr);
startup_screen->switchTo();
}
// lock current screen and go to the slave one if applicable
if (Config.startup_slave_screen_type)