Guard against null GameState in ReinitForCharacter

GameState() can return null during shutdown when camera re-init is
triggered. Add a null check before accessing m_currentArea.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Christian Semmler 2026-03-15 09:16:58 -07:00
parent aa48001eb3
commit e4dabad90c
No known key found for this signature in database
GPG Key ID: 086DAA1360BEEE5C

View File

@ -376,7 +376,7 @@ void Controller::HandleSDLEventImpl(SDL_Event* p_event)
void Controller::ReinitForCharacter()
{
if (IsRestrictedArea(GameState()->m_currentArea)) {
if (!GameState() || IsRestrictedArea(GameState()->m_currentArea)) {
m_active = false;
return;
}