mirror of
https://github.com/MaaAssistantArknights/MaaAssistantArknights.git
synced 2026-07-18 10:10:45 +08:00
fix: workaround for destruction order issue
which creates empty files with random name on Linux fix: https://github.com/MaaAssistantArknights/MaaAssistantArknights/issues/5255
This commit is contained in:
@@ -57,7 +57,7 @@ void asst::ResourceLoader::add_load_queue(AbstractResource& res, const std::file
|
||||
m_load_cv.notify_all();
|
||||
}
|
||||
|
||||
asst::ResourceLoader::~ResourceLoader()
|
||||
void asst::ResourceLoader::cancel()
|
||||
{
|
||||
m_load_thread_exit = true;
|
||||
|
||||
@@ -71,6 +71,11 @@ asst::ResourceLoader::~ResourceLoader()
|
||||
}
|
||||
}
|
||||
|
||||
asst::ResourceLoader::~ResourceLoader()
|
||||
{
|
||||
cancel();
|
||||
}
|
||||
|
||||
bool asst::ResourceLoader::load(const std::filesystem::path& path)
|
||||
{
|
||||
if (!std::filesystem::exists(path)) {
|
||||
|
||||
Reference in New Issue
Block a user