From 78d5996f09a23b66eb10fa2f2b94dd41967f3d5d Mon Sep 17 00:00:00 2001 From: Steve Date: Mon, 7 Mar 2011 08:48:18 +0000 Subject: added "&& myPeer.getPeerSize() > to 0" line 277 to eliminate null pointer exception on line 279 which will occur if no network is joined. I had fixed this in my previous code so it was simple. --- src/tesseract/World.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tesseract/World.java b/src/tesseract/World.java index 67527ca..648f537 100644 --- a/src/tesseract/World.java +++ b/src/tesseract/World.java @@ -274,7 +274,7 @@ public class World implements Observer { } // Was there a halfspace involved? If so, was it a side? - if (hs != null && hs.normal.y != 1 && hs.normal.y != -1) { + if (hs != null && hs.normal.y != 1 && hs.normal.y != -1 && myPeer.getPeerSize() > 0) { // Side collision, is there a peer? PeerInformation peer = myPeer.getPeerInDirection(o.getVelocity().x, -o.getVelocity().z); -- cgit v1.2.3