From 125df617516edc317ab800bdf897e6d076d7b324 Mon Sep 17 00:00:00 2001 From: Jonghyun Ho Date: Fri, 3 Apr 2015 16:18:35 +0900 Subject: [PATCH] Fixed crash in case that overshoot scroll is not enabled Change-Id: I4e92daaa51cdcb1d4ac61b5093ff7bdda5a9024d --- .../internal/controls/scrollable/item-view/item-view-impl.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/dali-toolkit/internal/controls/scrollable/item-view/item-view-impl.cpp b/dali-toolkit/internal/controls/scrollable/item-view/item-view-impl.cpp index 9ac90b9..43f134d 100644 --- a/dali-toolkit/internal/controls/scrollable/item-view/item-view-impl.cpp +++ b/dali-toolkit/internal/controls/scrollable/item-view/item-view-impl.cpp @@ -1638,7 +1638,12 @@ void ItemView::AnimateScrollOvershoot(float overshootAmount, bool animateBack) if(mOvershootAnimationSpeed > Math::MACHINE_EPSILON_0) { float currentOvershoot = mScrollPositionObject.GetProperty(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); -- 2.7.4