Fix crash when reloading virtual asset

This commit is contained in:
Wojtek Figat
2021-07-15 16:56:11 +02:00
parent 27deeff079
commit fe2419cd11

View File

@@ -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())
{