Change-Id: I4e92daaa51cdcb1d4ac61b5093ff7bdda5a9024d
if(mOvershootAnimationSpeed > Math::MACHINE_EPSILON_0)
{
float currentOvershoot = mScrollPositionObject.GetProperty<float>(ScrollConnector::OVERSHOOT);
- float duration = mOvershootOverlay.GetCurrentSize().height * (animatingOn ? (1.0f - fabsf(currentOvershoot)) : fabsf(currentOvershoot)) / mOvershootAnimationSpeed;
+ float duration = 0.0f;
+
+ if (mOvershootOverlay)
+ {
+ duration = mOvershootOverlay.GetCurrentSize().height * (animatingOn ? (1.0f - fabsf(currentOvershoot)) : fabsf(currentOvershoot)) / mOvershootAnimationSpeed;
+ }
RemoveAnimation(mScrollOvershootAnimation);
mScrollOvershootAnimation = Animation::New(duration);