Fixes crash from attempted nullptr access.

This commit is contained in:
Christopher Leggett 2023-12-11 12:19:57 -05:00
parent bc49998e55
commit c7c29034eb
No known key found for this signature in database
GPG Key ID: 7093AE5FF7037D79

View File

@ -694,7 +694,8 @@ void CheckTrackerFlagSet(int16_t flagType, int32_t flag) {
for (auto& loc : Rando::StaticData::GetLocationTable()) { for (auto& loc : Rando::StaticData::GetLocationTable()) {
if ((!IS_RANDO && ((loc.GetQuest() == RCQUEST_MQ && !IS_MASTER_QUEST) || if ((!IS_RANDO && ((loc.GetQuest() == RCQUEST_MQ && !IS_MASTER_QUEST) ||
(loc.GetQuest() == RCQUEST_VANILLA && IS_MASTER_QUEST))) || (loc.GetQuest() == RCQUEST_VANILLA && IS_MASTER_QUEST))) ||
(IS_RANDO && ((OTRGlobals::Instance->gRandoContext->GetDungeons()->GetDungeonFromScene(loc.GetScene())->IsMQ() && (IS_RANDO && !(OTRGlobals::Instance->gRandoContext->GetDungeons()->GetDungeonFromScene(loc.GetScene()) == nullptr) &&
((OTRGlobals::Instance->gRandoContext->GetDungeons()->GetDungeonFromScene(loc.GetScene())->IsMQ() &&
loc.GetQuest() == RCQUEST_VANILLA) || loc.GetQuest() == RCQUEST_VANILLA) ||
OTRGlobals::Instance->gRandoContext->GetDungeons()->GetDungeonFromScene(loc.GetScene())->IsVanilla() && OTRGlobals::Instance->gRandoContext->GetDungeons()->GetDungeonFromScene(loc.GetScene())->IsVanilla() &&
loc.GetQuest() == RCQUEST_MQ))) { loc.GetQuest() == RCQUEST_MQ))) {