From cceaf918a4bbda6e179370b0fac2084ef6df3c49 Mon Sep 17 00:00:00 2001 From: colinhl Date: Thu, 13 Feb 2025 21:15:00 +0800 Subject: [PATCH] fix Signed-off-by: colinhl --- Source/astcenc_internal.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Source/astcenc_internal.h b/Source/astcenc_internal.h index 4caf60d..5c07813 100644 --- a/Source/astcenc_internal.h +++ b/Source/astcenc_internal.h @@ -30,6 +30,7 @@ #endif #include #include +#include #ifdef ASTC_CUSTOMIZED_ENABLE #include @@ -2309,6 +2310,7 @@ public: CustomizedBlockMode customizedBlockModeFunc_; bool LoadSutCustomizedSo() { + std::lock_guard lock(astcCustomizedSoMutex_); if (!astcCustomizedSoOpened_) { #if defined(_WIN32) && !defined(__CYGWIN__) @@ -2415,6 +2417,7 @@ private: #else void *astcCustomizedSoHandle_; #endif + std::mutex astcCustomizedSoMutex_; }; extern AstcCustomizedSoManager g_astcCustomizedSoManager; #endif -- Gitee