Browse Source

RemoteConsole: prevent null access on connections

Yuxiao Mao 7 months ago
parent
commit
7bcfa59600
1 changed files with 1 additions and 0 deletions
  1. 1 0
      hrt/impl/RemoteConsole.hx

+ 1 - 0
hrt/impl/RemoteConsole.hx

@@ -27,6 +27,7 @@ class RemoteConsole {
 	public function new( ?port : Int, ?host : String ) {
 	public function new( ?port : Int, ?host : String ) {
 		this.host = host ?? DEFAULT_HOST;
 		this.host = host ?? DEFAULT_HOST;
 		this.port = port ?? DEFAULT_PORT;
 		this.port = port ?? DEFAULT_PORT;
+		this.connections = [];
 	}
 	}
 
 
 	public function startServer( ?onClient : RemoteConsoleConnection->Void ) {
 	public function startServer( ?onClient : RemoteConsoleConnection->Void ) {