diff --git a/src/util.h b/src/util.h index 97d638c93..60e99431b 100644 --- a/src/util.h +++ b/src/util.h @@ -599,6 +599,7 @@ public: T median() const { int size = vSorted.size(); + assert(size>0); if(size & 1) // Odd number of elements { return vSorted[size/2];