summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorThiep Ha <thiepha@gmail.com>2016-09-21 16:54:09 +0900
committerThiep Ha <thiepha@gmail.com>2016-09-21 17:03:14 +0900
commit3689a803dbfe1297e706d2fbfde239d641652de1 (patch)
tree2a54b9f165bf27e17cc48280ce542f3ba5879d05 /src
parent401706351d38cbfd6fa7e677af387400a888932a (diff)
elm_config: add null check before usage
Diffstat (limited to 'src')
-rw-r--r--src/lib/elementary/elm_config.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/lib/elementary/elm_config.c b/src/lib/elementary/elm_config.c
index af8394b8ff..0fe52b80c1 100644
--- a/src/lib/elementary/elm_config.c
+++ b/src/lib/elementary/elm_config.c
@@ -3772,9 +3772,10 @@ _translation_init(void)
3772 * en_/C where translating only parts of the interface make some 3772 * en_/C where translating only parts of the interface make some
3773 * sense). 3773 * sense).
3774 */ 3774 */
3775 _elm_config->translate = !(strcmp (cur_dom, "messages") && 3775 if (msg_locale)
3776 !*trans_comment && strncmp (msg_locale, "en_", 3) && 3776 _elm_config->translate = !(strcmp (cur_dom, "messages") &&
3777 strcmp (msg_locale, "C")); 3777 !*trans_comment && strncmp (msg_locale, "en_", 3) &&
3778 strcmp (msg_locale, "C"));
3778 /* Get RTL orientation from system */ 3779 /* Get RTL orientation from system */
3779 if (_elm_config->translate) 3780 if (_elm_config->translate)
3780 { 3781 {