Add assertion size>0 to MedianFilter

This commit is contained in:
Wladimir J. van der Laan 2011-09-29 17:17:42 +02:00
parent f33a43efdf
commit 20091df725

View File

@ -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];