aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRene Stoeckel <[email protected]>2005-12-17 20:32:29 +0000
committerRene Stoeckel <[email protected]>2005-12-17 20:32:29 +0000
commitc0464012cfcb7e1b16f1b18c54d14eb288a9c02b (patch)
tree24f1d140225d05d5d2ea728a3feac895d809e6eb /src
parentf20c4be009fb4f9b93112c4a6f71916fe06db128 (diff)
npe fix in Touch_Items
Diffstat (limited to 'src')
-rw-r--r--src/jake2/game/GameItems.java7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/jake2/game/GameItems.java b/src/jake2/game/GameItems.java
index 5f0206a..a8d3e54 100644
--- a/src/jake2/game/GameItems.java
+++ b/src/jake2/game/GameItems.java
@@ -19,7 +19,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
// Created on 16.11.2005 by RST.
-// $Id: GameItems.java,v 1.2 2005-11-20 22:18:33 salomo Exp $
+// $Id: GameItems.java,v 1.3 2005-12-17 20:32:29 salomo Exp $
package jake2.game;
@@ -1290,8 +1290,9 @@ public class GameItems {
public static void Touch_Item(edict_t ent, edict_t other, cplane_t plane,
csurface_t surf) {
boolean taken;
-
- if (other.client == null)
+
+ // freed edicts have not items.
+ if (other.client == null || ent.item == null)
return;
if (other.health < 1)
return; // dead people can't pickup