summaryrefslogtreecommitdiffstats
path: root/src/main/java/org/bukkit
diff options
context:
space:
mode:
authorspeakeasy <mekevin1917@gmail.com>2011-01-20 05:41:02 +0800
committertahg <tahgtahv@gmail.com>2011-01-20 05:52:36 +0800
commite93061be489dc6f3b4950284e41e50501e55450f (patch)
tree8d10f06a8c493742878f9f30502adda35c208182 /src/main/java/org/bukkit
parenteabdc7ffa9d9062389cd7608768e021c04151a98 (diff)
downloadcraftbukkit-e93061be489dc6f3b4950284e41e50501e55450f.tar
craftbukkit-e93061be489dc6f3b4950284e41e50501e55450f.tar.gz
craftbukkit-e93061be489dc6f3b4950284e41e50501e55450f.tar.lz
craftbukkit-e93061be489dc6f3b4950284e41e50501e55450f.tar.xz
craftbukkit-e93061be489dc6f3b4950284e41e50501e55450f.zip
Fix up NPE's in EntityMinecart/CraftVehicle and removed a little un-needed code in EntityArrow
Diffstat (limited to 'src/main/java/org/bukkit')
-rw-r--r--src/main/java/org/bukkit/craftbukkit/entity/CraftVehicle.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftVehicle.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftVehicle.java
index 04d8d187..3fbd7c00 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftVehicle.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftVehicle.java
@@ -16,7 +16,7 @@ public abstract class CraftVehicle extends CraftEntity implements Vehicle {
}
public Entity getPassenger() {
- return (getHandle().j.getBukkitEntity());
+ return isEmpty()?null:(getHandle().j.getBukkitEntity());
}
public boolean setPassenger(Entity passenger) {