Browse Source

RemoteConsole: fix sendCommand after close null access

Yuxiao Mao 6 tháng trước cách đây
mục cha
commit
167c69583f
1 tập tin đã thay đổi với 2 bổ sung0 xóa
  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);