Fix crash when starting without any defined custom screens

This commit is contained in:
Raphael Coeffic
2021-06-06 07:04:23 +02:00
parent 4cf8f36fba
commit fccfc8d6bd
+2 -1
View File
@@ -141,7 +141,8 @@ void ViewMain::updateTopbarVisibility()
int leftScroll = getScrollPositionX() % pageWidth;
if (leftScroll == 0) {
setTopbarVisible(hasTopbar(g_model.view));
customScreens[g_model.view]->adjustLayout();
if (customScreens[g_model.view])
customScreens[g_model.view]->adjustLayout();
}
else {
int leftIdx = getScrollPositionX() / pageWidth;