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(); ul.unlock();
#endif #endif
const GameState gamestate = g_state_manager->getGameState(); GameState gamestate = g_state_manager->getGameState();
// ---- some menus may need updating // ---- some menus may need updating
bool dialog_opened = false; bool dialog_opened = false;
@ -1236,6 +1236,8 @@ namespace GUIEngine
} }
} }
gamestate = g_state_manager->getGameState();
// ---- menu drawing // ---- menu drawing
// draw background image and sections // draw background image and sections

View File

@ -1871,7 +1871,11 @@ void Skin::drawListHeader(const irr::core::rect< irr::s32 > &rect,
void Skin::renderSections(PtrVector<Widget>* within_vector) void Skin::renderSections(PtrVector<Widget>* within_vector)
{ {
#ifndef SERVER_ONLY #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(); const unsigned short widgets_amount = within_vector->size();