projects
/
occt.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
eaf5c5e
)
0025164: BVH_Box::Area() might be called on uninitialized data
author
dbp
<dbp@opencascade.com>
Mon, 15 Sep 2014 14:08:03 +0000
(18:08 +0400)
committer
bugmaster
<bugmaster@opencascade.com>
Thu, 25 Sep 2014 11:58:09 +0000
(15:58 +0400)
src/BVH/BVH_Box.lxx
patch
|
blob
|
blame
|
history
diff --git
a/src/BVH/BVH_Box.lxx
b/src/BVH/BVH_Box.lxx
index
7affa94
..
8009881
100644
(file)
--- a/
src/BVH/BVH_Box.lxx
+++ b/
src/BVH/BVH_Box.lxx
@@
-199,7
+199,8
@@
namespace BVHTools
template<class T, int N>
T BVH_Box<T, N>::Area() const
{
template<class T, int N>
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);
}
// =======================================================================
}
// =======================================================================