Fix crash problems - GoBackward to specified SceneId while Previous transition animat...
authorSeungWon Lee <lsw2000.lee@samsung.com>
Wed, 12 Jun 2013 01:59:29 +0000 (10:59 +0900)
committerSeungWon Lee <lsw2000.lee@samsung.com>
Wed, 12 Jun 2013 01:59:29 +0000 (10:59 +0900)
Change-Id: Ib6e13b49f5001636ede4e7432bb0336d4e50cc6b
Signed-off-by: SeungWon Lee <lsw2000.lee@samsung.com>
src/ui/scenes/FUiScenes_SceneManagerImpl.cpp

index 74cb70c..74ac802 100644 (file)
@@ -643,6 +643,13 @@ _SceneManagerImpl::GoBackward(const BackwardSceneTransition& sceneTransition, co
                SysTryCatch(NID_UI_SCENES, !IsFailed(r), r = E_SYSTEM, E_SYSTEM, "[%s] A system error has been occurred.",
                                        GetErrorMessage(E_SYSTEM));
 
+               // Stop previous animation
+               if (!IsAnimationCompleted())
+               {
+                       r = StopAllAnimations();
+                       SysTryCatch(NID_UI_SCENES, !IsFailed(r), , r, "[%s] Propagating.", GetErrorMessage(r));
+               }
+
                // 2. if destoryOption == SCENE_DESTROY_OPTION_DESTROY then destroy all scenes except matching scene.
                if (backwardSceneTransition.GetDestroyOption() == SCENE_DESTROY_OPTION_DESTROY)
                {
@@ -673,13 +680,6 @@ _SceneManagerImpl::GoBackward(const BackwardSceneTransition& sceneTransition, co
                SysTryCatch(NID_UI_SCENES, __currentSceneId != destinationSceneId, r = E_INVALID_ARG, E_INVALID_ARG,
                                        "[%s] Invalid argument is used. Can't backward to current Scene.", GetErrorMessage(E_INVALID_ARG));
 
-               // Stop previous animation
-               if (!IsAnimationCompleted())
-               {
-                       r = StopAllAnimations();
-                       SysTryCatch(NID_UI_SCENES, !IsFailed(r), , r, "[%s] Propagating.", GetErrorMessage(r));
-               }
-
                // Transition
                r = GotoScene(false, destinationSceneId, backwardSceneTransition.GetAnimationType(),
                                          SCENE_HISTORY_OPTION_NO_HISTORY, backwardSceneTransition.GetDestroyOption(), pArgs);