Skip to content

Commit

Permalink
Do not crash on partial calc interpolation
Browse files Browse the repository at this point in the history
Fixes #12151

Fixes regression introduced by #11924
  • Loading branch information
notriddle committed Jul 2, 2016
1 parent 1ed0677 commit f9a8fe0
Showing 1 changed file with 2 additions and 2 deletions.
Expand Up @@ -329,8 +329,8 @@ impl Interpolate for CalcLengthOrPercentage {
#[inline]
fn interpolate(&self, other: &Self, time: f64) -> Result<Self, ()> {
Ok(CalcLengthOrPercentage {
length: try!(self.length.interpolate(&other.length, time)),
percentage: try!(self.percentage.interpolate(&other.percentage, time)),
length: self.length.interpolate(&other.length, time).ok().and_then(|x|x),
percentage: self.percentage.interpolate(&other.percentage, time).ok().and_then(|x|x),
})
}
}
Expand Down

0 comments on commit f9a8fe0

Please sign in to comment.