From 486475d4a3824e41b534ac5b906fa63f49e5423e Mon Sep 17 00:00:00 2001 From: cignoni Date: Sat, 5 May 2012 14:55:50 +0000 Subject: [PATCH] added another assert to histogram to avoid trash result... --- vcg/math/histogram.h | 1 + 1 file changed, 1 insertion(+) 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;