Add null point check to avoid crash issue 76/170176/3
authorzhangzg <zg84.zhang@samsung.com>
Wed, 14 Feb 2018 03:17:48 +0000 (11:17 +0800)
committerzhangzg <zg84.zhang@samsung.com>
Wed, 14 Feb 2018 03:32:17 +0000 (11:32 +0800)
Change-Id: I2a7c8616a8ea7bba978f09caddbac6995201f2c6

src/ise-stt-mode.cpp

index 1cb7501..bf7854c 100644 (file)
@@ -294,16 +294,16 @@ static Eina_Bool _idler_cb(void *data)
     Evas_Object *canvas = elm_object_part_content_get(voicedata->layout_main, "EFFECT_BG");
 
     is::ui::WInputSttMicEffect *ieffect = new is::ui::WInputSttMicEffect();
-    if (ieffect)
+    if (ieffect && voicedata->sttmanager) {
         ieffect->SetSttHandle(voicedata->sttmanager->GetSttHandle());
+    }
 
     is::ui::MicEffector *effector = new is::ui::MicEffector(canvas, voicedata->layout_main, *ieffect);
     voicedata->ieffect = ieffect;
     voicedata->effector = effector;
 
-    if (ieffect) {
+    if (ieffect && voicedata->progressbar) {
         ieffect->SetProgressBar(voicedata->progressbar);
-        ieffect->SetSttHandle(voicedata->sttmanager->GetSttHandle());
     }
 
     elm_access_highlight_set(voicedata->mic_button);