diff --git a/include/seastar/net/packet.hh b/include/seastar/net/packet.hh index 1fefada7b8d..dda38f5c48e 100644 --- a/include/seastar/net/packet.hh +++ b/include/seastar/net/packet.hh @@ -237,7 +237,10 @@ public: return *this; } - unsigned len() const noexcept { return _impl->_len; } + unsigned len() const noexcept { + SEASTAR_ASSERT(_impl); + return _impl->_len; + } unsigned memory() const noexcept { return len() + sizeof(packet::impl); } fragment frag(unsigned idx) const noexcept { return _impl->_frags[idx]; }