From fe2419cd115dd202eb0bb94efbc06dba266e537f Mon Sep 17 00:00:00 2001 From: Wojtek Figat Date: Thu, 15 Jul 2021 16:56:11 +0200 Subject: [PATCH] Fix crash when reloading virtual asset --- Source/Engine/Content/Asset.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Source/Engine/Content/Asset.cpp b/Source/Engine/Content/Asset.cpp index 0a1147891..03bb7f75f 100644 --- a/Source/Engine/Content/Asset.cpp +++ b/Source/Engine/Content/Asset.cpp @@ -241,6 +241,10 @@ bool Asset::ShouldDeleteFileOnUnload() const void Asset::Reload() { + // Virtual assets are memory-only so reloading them makes no sense + if (IsVirtual()) + return; + // It's better to call it from the main thread if (IsInMainThread()) {