diff options
Diffstat (limited to 'client/server_list.gd')
-rw-r--r-- | client/server_list.gd | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/client/server_list.gd b/client/server_list.gd index 851c6e70..f3c1b456 100644 --- a/client/server_list.gd +++ b/client/server_list.gd @@ -36,7 +36,7 @@ var mdns := HTTPRequest.new() var reg := HTTPRequest.new() var thread: Thread -var pid: int +var pid: int = -1 var mdns_timer := Timer.new() var reg_timer := Timer.new() @@ -124,4 +124,7 @@ func one_shot() -> void: func _exit_tree(): if thread != null: thread.wait_to_finish() - if pid != null: OS.kill(pid) + if pid != -1: + OS.kill(pid) + var x = null + OS.kill(x) # TODO this somehow prevents a crash on exit; but is invalid according to docs |