Browse Source

RemoteConsole: fix sendCommand after close null access

Yuxiao Mao 6 months ago
parent
commit
167c69583f
1 changed files with 2 additions and 0 deletions
  1. 2 0
      hrt/impl/RemoteConsole.hx

+ 2 - 0
hrt/impl/RemoteConsole.hx

@@ -162,6 +162,8 @@ class RemoteConsoleConnection {
 	}
 
 	public function sendCommand( cmd : String, ?args : Dynamic, ?onResult : Dynamic -> Void ) {
+		if( sock == null )
+			return;
 		var id = ++UID;
 		waitReply.set(id, onResult);
 		sendData(cmd, args, id);