Skip to content

Commit

Permalink
Merge pull request #14 from GTNewHorizons/null_guard
Browse files Browse the repository at this point in the history
Add a null check to avoid what looks like a battlesign related crash
  • Loading branch information
Dream-Master authored Mar 11, 2018
2 parents b9ec3be + 842b339 commit c99f85e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/main/java/tconstruct/tools/TinkerToolEvents.java
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,8 @@ public void onAttack (LivingAttackEvent event)
if (source.isProjectile())
{
Entity projectile = source.getSourceOfDamage();
if(projectile == null)
return;
Vec3 motion = Vec3.createVectorHelper(projectile.motionX, projectile.motionY, projectile.motionZ);
Vec3 look = player.getLookVec();

Expand Down

0 comments on commit c99f85e

Please sign in to comment.