Index: Source/core/animation/Animation.cpp |
diff --git a/Source/core/animation/Animation.cpp b/Source/core/animation/Animation.cpp |
index cbae427693f4b04d6439c976a5b224c0fefebf65..7a99a891a071e9f1de88016d141889dce6f58b0a 100644 |
--- a/Source/core/animation/Animation.cpp |
+++ b/Source/core/animation/Animation.cpp |
@@ -149,11 +149,12 @@ void Animation::applyEffects() |
double iteration = currentIteration(); |
ASSERT(iteration >= 0); |
+ OwnPtrWillBeRawPtr<WillBeHeapVector<RefPtrWillBeMember<Interpolation> > > interpolations = m_sampledEffect ? m_sampledEffect->mutableInterpolations() : nullptr; |
// FIXME: Handle iteration values which overflow int. |
- OwnPtrWillBeRawPtr<WillBeHeapVector<RefPtrWillBeMember<Interpolation> > > interpolations = m_effect->sample(static_cast<int>(iteration), timeFraction(), iterationDuration()); |
+ m_effect->sample(static_cast<int>(iteration), timeFraction(), iterationDuration(), interpolations); |
if (m_sampledEffect) { |
m_sampledEffect->setInterpolations(interpolations.release()); |
- } else if (!interpolations->isEmpty()) { |
+ } else if (interpolations && !interpolations->isEmpty()) { |
OwnPtrWillBeRawPtr<SampledEffect> sampledEffect = SampledEffect::create(this, interpolations.release()); |
m_sampledEffect = sampledEffect.get(); |
ensureAnimationStack(m_target).add(sampledEffect.release()); |