From: Richard Huang Date: Wed, 14 May 2014 16:52:19 +0000 (+0100) Subject: Fixed crash when KeyboardFocusManager clears the focus X-Git-Tag: dali-2014-wk21-release~14 X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=commitdiff_plain;h=8dd072cea384d6c48becf4482a60d3428c7f1373 Fixed crash when KeyboardFocusManager clears the focus [problem] There is crash if focus indicator is empty but KeyboardFocusManager tries to clear the focus. [cause] It doesn't check whether focus indicator exists before remove it from the current focused actor. [solution] Check whether focus indicator exists before remove it. --- diff --git a/base/dali-toolkit/internal/focus-manager/keyboard-focus-manager-impl.cpp b/base/dali-toolkit/internal/focus-manager/keyboard-focus-manager-impl.cpp index 7b1d929..193d985 100644 --- a/base/dali-toolkit/internal/focus-manager/keyboard-focus-manager-impl.cpp +++ b/base/dali-toolkit/internal/focus-manager/keyboard-focus-manager-impl.cpp @@ -341,7 +341,10 @@ void KeyboardFocusManager::ClearFocus() Actor actor = GetCurrentFocusActor(); if(actor) { - actor.Remove(mFocusIndicatorActor); + if(mFocusIndicatorActor) + { + actor.Remove(mFocusIndicatorActor); + } // Send notification for the change of focus actor if( !mFocusChangedSignalV2.Empty() )