diff --git a/include/blt/std/allocator.h b/include/blt/std/allocator.h index 3b5bfa5..2efbdc3 100644 --- a/include/blt/std/allocator.h +++ b/include/blt/std/allocator.h @@ -231,7 +231,8 @@ namespace blt template inline void destroy(U* p) { - p->~U(); + if (p) + p->~U(); } [[nodiscard]] inline size_t max_size() const