- // Delete pre focused actor in history because it will pushed again by SetCurrentFocusActor()
- mFocusHistory.Erase( --endPos );
+ // Impl of Actor is not null
+ if( target && target.OnStage() )
+ {
+ // Delete pre focused actor in history because it will pushed again by SetCurrentFocusActor()
+ mFocusHistory.pop_back();
+ SetCurrentFocusActor( target );
+ break;
+ }
+ else
+ {
+ // Target is empty handle or off stage. Erase from queue
+ mFocusHistory.pop_back();
+ }
+ }