From 987e6809086cbf01f3c3138cc8c1074bf41589dc Mon Sep 17 00:00:00 2001 From: Wojtek Figat Date: Fri, 3 Mar 2023 17:43:55 +0100 Subject: [PATCH] Fix warning on Asset::WaitForLoaded` when loading failed before --- Source/Engine/Content/Asset.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Source/Engine/Content/Asset.cpp b/Source/Engine/Content/Asset.cpp index 932fdb503..5585fbe7e 100644 --- a/Source/Engine/Content/Asset.cpp +++ b/Source/Engine/Content/Asset.cpp @@ -400,6 +400,11 @@ bool Asset::WaitForLoaded(double timeoutInMilliseconds) const return false; } + // Check if loading failed + Platform::MemoryBarrier(); + if (LastLoadFailed()) + return true; + // Check if has missing loading task Platform::MemoryBarrier(); const auto loadingTask = _loadingTask;