Fixed crash in case that overshoot scroll is not enabled 37/37737/1
authorJonghyun Ho <jonghyun.ho@samsung.com>
Fri, 3 Apr 2015 07:18:35 +0000 (16:18 +0900)
committerJonghyun Ho <jonghyun.ho@samsung.com>
Fri, 3 Apr 2015 07:20:04 +0000 (16:20 +0900)
Change-Id: I4e92daaa51cdcb1d4ac61b5093ff7bdda5a9024d

dali-toolkit/internal/controls/scrollable/item-view/item-view-impl.cpp

index 9ac90b9..43f134d 100644 (file)
@@ -1638,7 +1638,12 @@ void ItemView::AnimateScrollOvershoot(float overshootAmount, bool animateBack)
   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);