Fix assetion error in FocusManager 52/26152/2
authorRichard Huang <r.huang@samsung.com>
Mon, 18 Aug 2014 15:22:35 +0000 (16:22 +0100)
committerRichard Huang <r.huang@samsung.com>
Mon, 18 Aug 2014 15:25:15 +0000 (16:25 +0100)
Change-Id: I4bd833dd98802e44251191ddea51b8e38582d810

base/dali-toolkit/internal/focus-manager/focus-manager-impl.cpp

index dbf4146..8d90de6 100644 (file)
@@ -338,7 +338,10 @@ bool FocusManager::DoSetCurrentFocusActor(const unsigned int actorID)
       if(mIsAccessibilityTtsEnabled)
       {
         Dali::SoundPlayer soundPlayer = Dali::SoundPlayer::Get();
-        soundPlayer.PlaySound(FOCUS_SOUND_FILE);
+        if(soundPlayer)
+        {
+          soundPlayer.PlaySound(FOCUS_SOUND_FILE);
+        }
 
         // Play the accessibility attributes with the TTS player.
         Dali::TtsPlayer player = Dali::TtsPlayer::Get(Dali::TtsPlayer::SCREEN_READER);
@@ -573,7 +576,10 @@ bool FocusManager::DoMoveFocus(FocusIDIter focusIDIter, bool forward, bool wrapp
       {
         // play sound & skip moving once
         Dali::SoundPlayer soundPlayer = Dali::SoundPlayer::Get();
-        soundPlayer.PlaySound(FOCUS_CHAIN_END_SOUND_FILE);
+        if(soundPlayer)
+        {
+          soundPlayer.PlaySound(FOCUS_CHAIN_END_SOUND_FILE);
+        }
 
         mIsEndcapFeedbackPlayed = true;
         return true;