Change-Id: Ib53bb3348eb3ded9fc4d5353fce850db19f1e8f2
Signed-off-by: Jihoon Kim <jihoon48.kim@samsung.com>
//stt_feedback_initialize();
if (!my_voicedata) {
- my_voicedata = new VoiceData;
- if (my_voicedata == NULL) {
+ try {
+ my_voicedata = new VoiceData;
+ }
+ catch (std::bad_alloc &e) {
PRINTFUNC(DLOG_ERROR, "%d::::Heap Overflow, Voice Input cannot be shown!", __LINE__);
return;
}
Evas_Object *canvas = elm_object_part_content_get(voicedata->layout_main, "EFFECT_BG");
- is::ui::WInputSttMicEffect *ieffect = new is::ui::WInputSttMicEffect();
- if (ieffect) {
+ try {
+ is::ui::WInputSttMicEffect *ieffect = new is::ui::WInputSttMicEffect();
if (voicedata->sttmanager)
ieffect->SetSttHandle(voicedata->sttmanager->GetSttHandle());
if (voicedata->progressbar)
ieffect->SetProgressBar(voicedata->progressbar);
}
+ catch (std::bad_alloc &e) {
+ PRINTFUNC(DLOG_ERROR, "Failed to alloc Mic effect");
+ }
voicedata->mo->Update();