mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-06 18:26:22 +03:00
0025164: BVH_Box::Area() might be called on uninitialized data
This commit is contained in:
parent
eaf5c5e010
commit
418864aea1
@ -199,7 +199,8 @@ namespace BVHTools
|
|||||||
template<class T, int N>
|
template<class T, int N>
|
||||||
T BVH_Box<T, N>::Area() const
|
T BVH_Box<T, N>::Area() const
|
||||||
{
|
{
|
||||||
return BVHTools::SurfaceCalculator<T, N>::Area (myMaxPoint - myMinPoint);
|
return !myInitialized ? static_cast<T> (0.0) :
|
||||||
|
BVHTools::SurfaceCalculator<T, N>::Area (myMaxPoint - myMinPoint);
|
||||||
}
|
}
|
||||||
|
|
||||||
// =======================================================================
|
// =======================================================================
|
||||||
|
Loading…
x
Reference in New Issue
Block a user