dvr: Fix the NULL dereference caused by the previous ccommit

This commit is contained in:
Jaroslav Kysela 2014-05-28 19:30:09 +02:00
parent 1d7b92ea1f
commit 81236d508c

View file

@ -176,7 +176,7 @@ dvr_charset_update(dvr_config_t *cfg, const char *charset)
free(cfg->dvr_charset_id);
s = charset ? charset : intlconv_filesystem_charset();
id = intlconv_charset_id(s, 1, 1);
cfg->dvr_charset = strdup(s);
cfg->dvr_charset = s ? strdup(s) : NULL;
cfg->dvr_charset_id = id ? strdup(id) : NULL;
}