diff --git a/vcg/math/histogram.h b/vcg/math/histogram.h index 4130c10e..f98fee45 100644 --- a/vcg/math/histogram.h +++ b/vcg/math/histogram.h @@ -165,6 +165,7 @@ public: ScalarType Percentile(ScalarType perc) { + assert(!vec.empty()); assert(perc>=0 && perc<=1); DirtyCheck(); int index = vec.size() *perc -1;