Skip to content

Commit

Permalink
donot call AnimClass->SetOwnerObject on nullptr anim
Browse files Browse the repository at this point in the history
  • Loading branch information
Otamaa authored Jan 3, 2025
1 parent 7090604 commit 9d6cf38
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Ext/Techno/Hooks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,9 @@ DEFINE_HOOK(0x6F9FA9, TechnoClass_AI_PromoteAnim, 0x6)
promAnim = GameCreate<AnimClass>(RulesExt::Global()->Promote_VeteranAnimation, pThis->GetCenterCoords());
else if (RulesExt::Global()->Promote_EliteAnimation)
promAnim = GameCreate<AnimClass>(RulesExt::Global()->Promote_EliteAnimation, pThis->GetCenterCoords());
promAnim->SetOwnerObject(pThis);

if(promAnim)
promAnim->SetOwnerObject(pThis);
}

return aresProcess();
Expand Down

0 comments on commit 9d6cf38

Please sign in to comment.