From 4d447b7544f343dd435149b999432abfaec8923d Mon Sep 17 00:00:00 2001 From: Wojtek Figat Date: Tue, 3 Feb 2026 23:33:09 +0100 Subject: [PATCH] Fix very rare race condition when waiting for an asset to load --- Source/Engine/Content/Asset.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Source/Engine/Content/Asset.cpp b/Source/Engine/Content/Asset.cpp index 9fd4cee9c..7a35d3b28 100644 --- a/Source/Engine/Content/Asset.cpp +++ b/Source/Engine/Content/Asset.cpp @@ -487,6 +487,8 @@ bool Asset::WaitForLoaded(double timeoutInMilliseconds) const const auto loadingTask = (ContentLoadTask*)Platform::AtomicRead(&_loadingTask); if (loadingTask == nullptr) { + if (IsLoaded()) + return false; LOG(Warning, "WaitForLoaded asset \'{0}\' failed. No loading task attached and asset is not loaded.", ToString()); return true; }