diff --git a/src/util/PeakBuffer.cxx b/src/util/PeakBuffer.cxx index 8358949c1..e4624bbec 100644 --- a/src/util/PeakBuffer.cxx +++ b/src/util/PeakBuffer.cxx @@ -122,8 +122,9 @@ PeakBuffer::Append(const void *data, size_t length) return true; } - if (peak_buffer == nullptr && peak_size > 0) { - peak_buffer = new DynamicFifoBuffer(peak_size); + if (peak_buffer == nullptr) { + if (peak_size > 0) + peak_buffer = new DynamicFifoBuffer(peak_size); if (peak_buffer == nullptr) return false; }