mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +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]
|
#[inline]
|
||||||
fn interpolate(&self, other: &Self, time: f64) -> Result<Self, ()> {
|
fn interpolate(&self, other: &Self, time: f64) -> Result<Self, ()> {
|
||||||
Ok(CalcLengthOrPercentage {
|
Ok(CalcLengthOrPercentage {
|
||||||
length: try!(self.length.interpolate(&other.length, time)),
|
length: self.length.interpolate(&other.length, time).ok().and_then(|x|x),
|
||||||
percentage: try!(self.percentage.interpolate(&other.percentage, time)),
|
percentage: self.percentage.interpolate(&other.percentage, time).ok().and_then(|x|x),
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue