config: coverify - fix possible NULL dereference

This commit is contained in:
Jaroslav Kysela 2014-10-03 15:21:47 +02:00
parent fb30be0a6f
commit f0e4ec0e10

View file

@ -787,7 +787,7 @@ config_modify_dvr_log( htsmsg_t *c, uint32_t id, const char *uuid, const void *a
htsmsg_delete_field(c, "autorec");
HTSMSG_FOREACH(f, list) {
if (!(e = htsmsg_field_get_map(f))) continue;
if (strcmp(s1, htsmsg_get_str(e, "id")) == 0) {
if (strcmp(s1, htsmsg_get_str(e, "id") ?: "") == 0) {
htsmsg_add_str(c, "autorec", htsmsg_get_str(e, "uuid"));
break;
}