Browse Source

minor fix

ncannasse 8 years ago
parent
commit
2d64691301
1 changed files with 1 additions and 1 deletions
  1. 1 1
      hxd/net/SocketHost.hx

+ 1 - 1
hxd/net/SocketHost.hx

@@ -36,7 +36,7 @@ class SocketClient extends NetworkClient {
 		if( s != null )
 			s.onData = function() {
 				// process all pending messages
-				while( readData(socket.input, socket.input.available) ) {
+				while( socket != null && readData(socket.input, socket.input.available) ) {
 				}
 			}
 	}