Fixed a crash when starting cutscene using debug menu

This commit is contained in:
Deve 2019-11-22 21:01:54 +01:00
parent 8a26ae009e
commit f0dd933ef6
2 changed files with 8 additions and 2 deletions

View File

@ -1209,7 +1209,7 @@ namespace GUIEngine
ul.unlock();
#endif
const GameState gamestate = g_state_manager->getGameState();
GameState gamestate = g_state_manager->getGameState();
// ---- some menus may need updating
bool dialog_opened = false;
@ -1235,6 +1235,8 @@ namespace GUIEngine
screen->onUpdate(elapsed_time);
}
}
gamestate = g_state_manager->getGameState();
// ---- menu drawing

View File

@ -1871,7 +1871,11 @@ void Skin::drawListHeader(const irr::core::rect< irr::s32 > &rect,
void Skin::renderSections(PtrVector<Widget>* within_vector)
{
#ifndef SERVER_ONLY
if (within_vector == NULL) within_vector = &getCurrentScreen()->m_widgets;
if (within_vector == NULL && getCurrentScreen())
within_vector = &getCurrentScreen()->m_widgets;
if (!within_vector)
return;
const unsigned short widgets_amount = within_vector->size();