Skip to content

Commit 758c78f

Browse files
committed
Added ComponentExists check for EffectDispatchTimer
1 parent 012ab83 commit 758c78f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

ChaosMod/Util/Player.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,8 @@ inline void TeleportPlayer(const Vector3 &coords, bool noOffset = false)
4141

4242
inline void TeleportPlayerFindZ(float x, float y)
4343
{
44-
bool shouldPause = GetComponent<EffectDispatchTimer>()->IsUsingDistanceBasedDispatch()
44+
bool shouldPause = ComponentExists<EffectDispatchTimer>()
45+
&& GetComponent<EffectDispatchTimer>()->IsUsingDistanceBasedDispatch()
4546
&& !GetComponent<EffectDispatchTimer>()->IsTimerPaused();
4647

4748
if (shouldPause)

0 commit comments

Comments
 (0)