diff --git a/src/groups/mqb/mqbcmd/mqbcmd_humanprinter.cpp b/src/groups/mqb/mqbcmd/mqbcmd_humanprinter.cpp index dfce8976fe..65297b68b4 100644 --- a/src/groups/mqb/mqbcmd/mqbcmd_humanprinter.cpp +++ b/src/groups/mqb/mqbcmd/mqbcmd_humanprinter.cpp @@ -51,7 +51,8 @@ struct SortPurgeQueueResultByBytesDesc { bool operator()(const PurgeQueueResult& lhs, const PurgeQueueResult& rhs) const { - return (lhs.queue().numBytesPurged() > rhs.queue().numBytesPurged()); + return (lhs.isQueueValue() ? lhs.queue().numBytesPurged() : 0) > + (rhs.isQueueValue() ? rhs.queue().numBytesPurged() : 0); } };