From 418864aea16924f5c9b360a2c5aced7c3c72800f Mon Sep 17 00:00:00 2001 From: dbp Date: Mon, 15 Sep 2014 18:08:03 +0400 Subject: [PATCH] 0025164: BVH_Box::Area() might be called on uninitialized data --- src/BVH/BVH_Box.lxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/BVH/BVH_Box.lxx b/src/BVH/BVH_Box.lxx index 7affa94eac..80098819e6 100644 --- a/src/BVH/BVH_Box.lxx +++ b/src/BVH/BVH_Box.lxx @@ -199,7 +199,8 @@ namespace BVHTools template T BVH_Box::Area() const { - return BVHTools::SurfaceCalculator::Area (myMaxPoint - myMinPoint); + return !myInitialized ? static_cast (0.0) : + BVHTools::SurfaceCalculator::Area (myMaxPoint - myMinPoint); } // =======================================================================