elm_config: add null check before usage

This commit is contained in:
Thiep Ha 2016-09-21 16:54:09 +09:00
parent 401706351d
commit 3689a803db
1 changed files with 4 additions and 3 deletions

View File

@ -3772,9 +3772,10 @@ _translation_init(void)
* en_/C where translating only parts of the interface make some
* sense).
*/
_elm_config->translate = !(strcmp (cur_dom, "messages") &&
!*trans_comment && strncmp (msg_locale, "en_", 3) &&
strcmp (msg_locale, "C"));
if (msg_locale)
_elm_config->translate = !(strcmp (cur_dom, "messages") &&
!*trans_comment && strncmp (msg_locale, "en_", 3) &&
strcmp (msg_locale, "C"));
/* Get RTL orientation from system */
if (_elm_config->translate)
{