diff options
| author | Steve <steveb9@u.washington.edu> | 2011-03-07 08:48:18 +0000 | 
|---|---|---|
| committer | Steve <steveb9@u.washington.edu> | 2011-03-07 08:48:18 +0000 | 
| commit | 78d5996f09a23b66eb10fa2f2b94dd41967f3d5d (patch) | |
| tree | 5271b5e1f22a5c270d52db3c384bf140ffe77879 | |
| parent | b4cdaf79518c36e02fc9fd1e815837d6596f2822 (diff) | |
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.
| -rw-r--r-- | src/tesseract/World.java | 2 | 
1 files changed, 1 insertions, 1 deletions
| 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); | 
