diff --git a/cocos/platform/CCImage.cpp b/cocos/platform/CCImage.cpp index 43e1fa794b..f44a552e0b 100644 --- a/cocos/platform/CCImage.cpp +++ b/cocos/platform/CCImage.cpp @@ -41,6 +41,9 @@ THE SOFTWARE. #define STBI_NO_HDR #define STBI_NO_TGA #define STB_IMAGE_IMPLEMENTATION +#if CC_TARGET_PLATFORM == CC_PLATFORM_IOS +#define STBI_NO_THREAD_LOCALS +#endif #include "stb/stb_image.h" extern "C"