Fix crash on closing game during background image upscaling

This commit is contained in:
Ivan Savenko
2025-03-12 14:18:44 +00:00
parent 6855b895a0
commit 96d691b40c
10 changed files with 71 additions and 24 deletions
+4
View File
@@ -27,6 +27,7 @@
#include "../client/windows/CMessage.h"
#include "../client/windows/InfoWindows.h"
#include "../lib/AsyncRunner.h"
#include "../lib/CConsoleHandler.h"
#include "../lib/CConfigHandler.h"
#include "../lib/CThreadHelper.h"
@@ -417,6 +418,9 @@ int main(int argc, char * argv[])
vstd::clear_pointer(graphics);
}
// must be executed before reset - since unique_ptr resets pointer to null before calling destructor
ENGINE->async().wait();
ENGINE.reset();
vstd::clear_pointer(LIBRARY);