From d10481f5f3ddd80b865c39dec279da3420329e3e Mon Sep 17 00:00:00 2001 From: "sungwook79.park" Date: Wed, 25 Oct 2017 18:37:44 +0900 Subject: [PATCH] Fix issue that voice recording file is crashed Change-Id: Ic17b9e6938dc62f93d84604bd3383e8cb1bef0f1 Signed-off-by: sungwook79.park --- src/voice-recorder.cpp | 2 +- src/w-input-stt-voice.cpp | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/voice-recorder.cpp b/src/voice-recorder.cpp index ef2c017..23139df 100644 --- a/src/voice-recorder.cpp +++ b/src/voice-recorder.cpp @@ -18,7 +18,7 @@ #include #include #include -#include +#include "Debug.h" #include #include "voice-recorder.h" diff --git a/src/w-input-stt-voice.cpp b/src/w-input-stt-voice.cpp index 7ce7973..5e3f576 100755 --- a/src/w-input-stt-voice.cpp +++ b/src/w-input-stt-voice.cpp @@ -452,11 +452,13 @@ static void on_confirm_button_clicked_cb(void *data, Evas_Object *obj, void *eve } SECURE_LOGD("result_text = %s", result_text.c_str()); + stop_voice_recorder(); char *filePath = NULL; voice_recorder *vr = _voice_recorder_get_data(); - if (!vr) + if (vr) filePath = vr->file_path; + char *path[] = {filePath, }; reply_to_sender_by_callback(result_text.c_str(), "voice", (const char **)path, NULL); destroy_voice(); -- 2.7.4