From: Wonnam Jang Date: Fri, 22 Sep 2017 01:20:11 +0000 (+0900) Subject: Ignore to connect daemon when client is already destroyed X-Git-Tag: accepted/tizen/unified/20180305.062850~21 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7f13ea9b6ce5215a058160dd60e8d37dbee5e024;p=platform%2Fcore%2Fuifw%2Fstt.git Ignore to connect daemon when client is already destroyed Change-Id: Id17873d0c082d044b58695ee59b785acb8bf9139 Signed-off-by: Wonnam Jang (cherry picked from commit 49bfccfd7856465003dfc25d212d9e41e53aaa04) --- diff --git a/client/stt.c b/client/stt.c index f4fe7a6..178f26c 100644 --- a/client/stt.c +++ b/client/stt.c @@ -916,6 +916,11 @@ static Eina_Bool __stt_connect_daemon(void *data) return EINA_FALSE; } + if (0 == stt_client_get_size() || NULL == stt_client_get_by_uid(client->uid)) { + SLOG(LOG_ERROR, TAG_STTC, "[ERROR] Client has been already destroyed"); + return EINA_FALSE; + } + /* Check and Set vconfkey of custom engine before sending hello */ if (1 == g_privilege_applaunch_allowed && NULL != client->current_engine_id) { /* Set vconfkey */