Ignore to connect daemon when client is already destroyed 71/151771/1
authorWonnam Jang <wn.jang@samsung.com>
Fri, 22 Sep 2017 01:20:11 +0000 (10:20 +0900)
committerWonnam Jang <wn.jang@samsung.com>
Fri, 22 Sep 2017 02:34:03 +0000 (02:34 +0000)
Change-Id: Id17873d0c082d044b58695ee59b785acb8bf9139
Signed-off-by: Wonnam Jang <wn.jang@samsung.com>
(cherry picked from commit 49bfccfd7856465003dfc25d212d9e41e53aaa04)

client/stt.c

index f4fe7a6..178f26c 100644 (file)
@@ -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 */