From af91c13b5c0b5601508092a5fedecfb35699afb5 Mon Sep 17 00:00:00 2001 From: Wojtek Figat Date: Thu, 4 Jan 2024 09:14:27 +0100 Subject: [PATCH] Fix crash on Mono --- Source/Engine/Scripting/ScriptingObject.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/Engine/Scripting/ScriptingObject.cpp b/Source/Engine/Scripting/ScriptingObject.cpp index 59ac26484..2f0570658 100644 --- a/Source/Engine/Scripting/ScriptingObject.cpp +++ b/Source/Engine/Scripting/ScriptingObject.cpp @@ -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