Skip to content

Commit

Permalink
fix: magic effect crash
Browse files Browse the repository at this point in the history
  • Loading branch information
RobbeBryssinck committed May 28, 2022
1 parent 00d8126 commit f53ca46
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Code/client/Games/Skyrim/Magic/MagicTarget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,11 @@ Actor* MagicTarget::GetTargetAsActor()
bool TP_MAKE_THISCALL(HookAddTarget, MagicTarget, MagicTarget::AddTargetData& arData)
{
Actor* pTargetActor = apThis->GetTargetAsActor();
ActorExtension* pTargetActorEx = pTargetActor->GetExtension();

if (!pTargetActorEx)
if (!pTargetActor)
return ThisCall(RealAddTarget, apThis, arData);

ActorExtension* pTargetActorEx = pTargetActor->GetExtension();

if (arData.pEffectItem->IsWerewolfEffect())
pTargetActorEx->GraphDescriptorHash = AnimationGraphDescriptor_WerewolfBehavior::m_key;

Expand Down

0 comments on commit f53ca46

Please sign in to comment.