Fixed the curve bug for real this time. Last fix to the curve just hid it.

https://bugs.launchpad.net/panda3d/+bug/383969

Happy curving without segfaults!
This commit is contained in:
treeform 2010-01-12 08:19:15 +00:00
parent ca2ec74da7
commit fa700bd7c3
2 changed files with 3 additions and 5 deletions

View File

@ -518,10 +518,6 @@ evaluate(float t, LVecBase3f &xyz, LVecBase3f &hpr) const {
}
}
if (default_curve == (ParametricCurve *)NULL) {
return false;
}
if (xyz_curve == (ParametricCurve *)NULL) {
xyz_curve = default_curve;
}

View File

@ -82,7 +82,9 @@ bool PiecewiseCurve::
get_point(float t, LVecBase3f &point) const {
const ParametricCurve *curve;
bool result = find_curve(curve, t);
if (curve == NULL){
return false;
}
// We use | instead of || so we won't short-circuit this calculation.
return result | curve->get_point(t, point);
}