Do not crash on NULL strings

master
Yevgen Muntyan 2007-07-13 16:04:53 -05:00
parent 01bc2238a5
commit 292d0b933e
1 changed files with 1 additions and 1 deletions

View File

@ -314,7 +314,7 @@ enc_mgr_save (EncodingsManager *enc_mgr)
static const char *
get_rid_of_locale (const char *enc_name)
{
if (!strcmp (enc_name, "locale"))
if (enc_name && !strcmp (enc_name, "locale"))
return _moo_encoding_locale ();
else
return enc_name;