Skip to content

Commit

Permalink
Fix NPE at World.java:448
Browse files Browse the repository at this point in the history
Signed-off-by: Ross Allan <rallanpcl@gmail.com>
  • Loading branch information
LunNova committed Jul 11, 2013
1 parent 7a8134c commit 4d9fb28
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/common/nallar/patched/world/PatchWorld.java
Expand Up @@ -442,10 +442,11 @@ public void updateEntityWithOptionalForce(Entity entity, boolean notForced) {
this.theProfiler.endSection();

if (notForced && entity.addedToChunk && entity.riddenByEntity != null) {
if (!entity.riddenByEntity.isDead && entity.riddenByEntity.ridingEntity == entity) {
this.updateEntity(entity.riddenByEntity);
Entity riddenByEntity = entity.riddenByEntity;
if (!riddenByEntity.isDead && riddenByEntity.ridingEntity == entity) {
this.updateEntity(riddenByEntity);
} else {
entity.riddenByEntity.ridingEntity = null;
riddenByEntity.ridingEntity = null;
entity.riddenByEntity = null;
}
}
Expand Down

0 comments on commit 4d9fb28

Please sign in to comment.