fix: explicitly check construct function error in thread_safe.h (#5184)

This commit is contained in:
Kishi
2026-05-25 16:53:29 +02:00
committed by GitHub
parent dbce229174
commit b91ace723d
+1 -1
View File
@@ -438,7 +438,7 @@ namespace safe {
if (!_count) {
new (_object_buf.data()) element_type;
if (_construct(*reinterpret_cast<element_type *>(_object_buf.data()))) {
if (_construct(*reinterpret_cast<element_type *>(_object_buf.data())) != 0) {
return ptr_t {nullptr};
}
}