Fix crash on Mono

This commit is contained in:
Wojtek Figat
2024-01-04 09:14:27 +01:00
parent e04c98020c
commit af91c13b5c

View File

@@ -433,7 +433,7 @@ bool ScriptingObject::CanCast(const MClass* from, const MClass* to)
return true;
CHECK_RETURN(from && to, false);
#if PLATFORM_LINUX || PLATFORM_MAC
#if DOTNET_HOST_MONO
// Cannot enter GC unsafe region if the thread is not attached
MCore::Thread::Attach();
#endif