Ignore to connect daemon when client is already destroyed
[platform/core/uifw/stt.git] / 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 */