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

This commit is contained in:
Kishi authored and GitHub committed 2026-05-25 10:53:29 -04:00
1 parent dbce229174
commit b91ace723d
1 file changed
+1 -1
+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};
}
}