diff options
author | metamuffin <metamuffin@disroot.org> | 2025-06-16 21:38:47 +0200 |
---|---|---|
committer | metamuffin <metamuffin@disroot.org> | 2025-06-16 21:38:50 +0200 |
commit | 6ecc032c0868d7d2901f4b95ec33c373886f6fc7 (patch) | |
tree | 5f582fd77a3e93e2ad6f7a415d09017370f5ccd2 | |
parent | 4dbfbaed68390340361bb00f202debc4d04f978d (diff) | |
download | hurrycurry-6ecc032c0868d7d2901f4b95ec33c373886f6fc7.tar hurrycurry-6ecc032c0868d7d2901f4b95ec33c373886f6fc7.tar.bz2 hurrycurry-6ecc032c0868d7d2901f4b95ec33c373886f6fc7.tar.zst |
fix crash on exit; fixes #292
-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 |