diff --git a/Source/Contents/Effects/EffectResourceSwitcher.cpp b/Source/Contents/Effects/EffectResourceSwitcher.cpp index 1001438c2..41235bb13 100644 --- a/Source/Contents/Effects/EffectResourceSwitcher.cpp +++ b/Source/Contents/Effects/EffectResourceSwitcher.cpp @@ -155,7 +155,8 @@ void EffectResourceSwitcher::OnProcess() { CEZ2STREffectEx* previous = this->effect; this->sourceName = this->targetName; this->targetName = ""; - this->effect = static_cast(g_effectMgr->Spawn(0, CEZ2STREffectMgr::GetInstance()->EffectId(this->sourceName), this->spawnPosition, 0, -1, 0, 0)); + EffectLists* effectMgr = g_effectMgr; + this->effect = static_cast(effectMgr->Spawn(0, CEZ2STREffectMgr::GetInstance()->EffectId(this->sourceName), this->spawnPosition, 0, -1, 0, 0)); this->active = 0; if (previous) { previous->EndLoop(0);