CSpankWeed: Fix collision manager null deref

This commit is contained in:
Luke Street 2020-03-25 03:47:56 -04:00
parent 90d61ae7ed
commit da648b18d8
1 changed files with 3 additions and 2 deletions

View File

@ -109,8 +109,9 @@ void CSpankWeed::AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId uid, CState
CPatterned::AcceptScriptMsg(msg, uid, mgr);
if (GetActive() != oldActive)
x594_collisionMgr.reset();
bool active = GetActive();
if (active != oldActive && x594_collisionMgr)
x594_collisionMgr->SetActive(mgr, active);
}
void CSpankWeed::Think(float dt, CStateManager& mgr) {