aboutsummaryrefslogtreecommitdiff
path: root/src/util.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/util.h')
-rw-r--r--src/util.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/util.h b/src/util.h
index 97d638c93e..60e99431b1 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];