mirror of
https://github.com/vcmi/vcmi.git
synced 2026-06-19 22:57:37 +02:00
Fix crash on closing game during background image upscaling
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user