Exit crash (#140)

* Fixes crash on exit

* Shorter comment

---------

Co-authored-by: Person Person <firestarscree123@gmail.com>
This commit is contained in:
person-person 2023-10-16 04:57:39 -04:00 committed by GitHub
parent 277bcfe48e
commit 345bb0e419
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -758,6 +758,10 @@ pub fn main() !void {
gui.windowlist.gpu_performance_measuring.stopQuery(); gui.windowlist.gpu_performance_measuring.stopQuery();
} }
} }
// Make sure that threadPool is done before freeing any data
threadPool.clear();
if(game.world) |world| { if(game.world) |world| {
world.deinit(); world.deinit();
game.world = null; game.world = null;