diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2011-09-29 17:17:42 +0200 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2011-09-29 17:17:42 +0200 |
commit | 20091df725e56376f6df0f71d19c63a34a5bf71d (patch) | |
tree | 32b3cb8230700c6d6646b76641319a8fa9b60d0f /src | |
parent | f33a43efdf2aacd3ada68a7027758877fa321169 (diff) |
Add assertion size>0 to MedianFilter
Diffstat (limited to 'src')
-rw-r--r-- | src/util.h | 1 |
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]; |