diff -r 961663d05463 -r 109b07334fa0 bbox.cpp --- a/bbox.cpp Thu Mar 21 16:25:03 2013 +0200 +++ b/bbox.cpp Thu Mar 21 18:26:57 2013 +0200 @@ -107,13 +107,15 @@ double fXScale = (v0.x - v1.x); double fYScale = (v0.y - v1.y); double fZScale = (v0.z - v1.z); - double* fpSize = &fZScale; + double fSize = fZScale; if (fXScale > fYScale) { if (fXScale > fZScale) - fpSize = &fXScale; + fSize = fXScale; } else if (fYScale > fZScale) - fpSize = &fYScale; + fSize = fYScale; - return (*fpSize) / 2; + if (fSize >= 2.0f) + return (fSize / 2); + return 1.0f; }