diff --git a/be/src/vec/common/pod_array.h b/be/src/vec/common/pod_array.h index 9a00e295cb34fa..d4324c91f75e4f 100644 --- a/be/src/vec/common/pod_array.h +++ b/be/src/vec/common/pod_array.h @@ -445,7 +445,8 @@ class PODArray : public PODArrayBase void emplace_back(Args&&... args) { - if (UNLIKELY(this->c_end + sizeof(T) > this->c_end_of_storage)) { + if (UNLIKELY(this->c_end == nullptr || + (this->c_end + sizeof(T) > this->c_end_of_storage))) { this->reserve_for_next_size(); }