mirror of
https://github.com/servo/servo.git
synced 2025-08-05 21:50:18 +01:00
Do not crash on partial calc interpolation
Fixes #12151 Fixes regression introduced by #11924
This commit is contained in:
parent
1ed06777ee
commit
f9a8fe0afe
1 changed files with 2 additions and 2 deletions
|
@ -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),
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue