Add null checker into display_language_changed 57/171257/1
authorsooyeon.kim <sooyeon.kim@samsung.com>
Mon, 12 Feb 2018 01:42:06 +0000 (10:42 +0900)
committerSooyeon Kim <sooyeon.kim@samsung.com>
Wed, 28 Feb 2018 02:42:02 +0000 (02:42 +0000)
Change-Id: I490f5798d1f38bfa560f6c4c107b35a5d00e708a
Signed-off-by: sooyeon.kim <sooyeon.kim@samsung.com>
(cherry picked from commit 7495451d99686e645c8bb9558b6bace7fca6e9af)

common/tts_config_mgr.c

index 1522950..527474d 100644 (file)
@@ -675,6 +675,11 @@ int __tts_config_set_auto_language()
 
 void __tts_config_display_language_changed_cb(keynode_t *key, void *data)
 {
+       if (NULL == g_config_info) {
+               SLOG(LOG_ERROR, tts_tag(), "[ERROR] Current config info is invalid.");
+               return;
+       }
+
        if (true == g_config_info->auto_voice) {
                __tts_config_set_auto_language();
        }