浏览代码

[ue4] Fixes FMemory::Free crash. Still unsure why this is happening. Possibly cross-DLL allocation/free.

badlogic 7 年之前
父节点
当前提交
acca89688d
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      spine-ue4/Plugins/SpinePlugin/Source/SpinePlugin/Private/SpinePlugin.cpp

+ 2 - 1
spine-ue4/Plugins/SpinePlugin/Source/SpinePlugin/Private/SpinePlugin.cpp

@@ -53,7 +53,8 @@ static void * SpineRealloc( void* ptr, size_t size ) {
 }
 
 void FSpinePlugin::StartupModule() {
-#if !UE_EDITOR
+	// Needed for consoles, see https://github.com/EsotericSoftware/spine-runtimes/pull/1089
+#if !UE_EDITOR && !PLATFORM_WINDOWS && !PLATFORM_MAC && !PLATFORM_LINUX && !PLATFORM_IOS && !PLATFORM_ANDROID && !PLATFORM_HTML5
     _spSetMalloc( &SpineMalloc );
     _spSetRealloc( &SpineRealloc );
     _spSetFree( FMemory::Free );