Skip to content

Commit

Permalink
Fix stack overflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Morphan1 committed Jul 9, 2013
1 parent 2eacd78 commit f3822c7
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -149,7 +149,7 @@ public void execute(final ScriptEntry scriptEntry) throws CommandExecutionExcept
// Because setPassenger() is a toggle, only use it if the new passenger
// is not already the current passenger

if (entity.getPassenger() != lastEntity) {
if (entity.getPassenger() != lastEntity && lastEntity != entity) {
lastEntity.teleport(entity.getLocation());
entity.setPassenger(lastEntity);
}
Expand Down

0 comments on commit f3822c7

Please sign in to comment.