Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
htsmsg: add extra NULL check, to htsmsg_cmp()
  • Loading branch information
perexg committed Nov 12, 2015
1 parent bafa612 commit 5d1ee60
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/htsmsg.c
Expand Up @@ -951,6 +951,12 @@ htsmsg_cmp(htsmsg_t *m1, htsmsg_t *m2)
return 1;

f2 = TAILQ_FIRST(&m2->hm_fields);
if (f2 == NULL) {
if (TAILQ_FIRST(&m1->hm_fields) == NULL)
return 0;
return 1;
}

TAILQ_FOREACH(f1, &m1->hm_fields, hmf_link) {

if (f1->hmf_type != f2->hmf_type)
Expand Down

0 comments on commit 5d1ee60

Please sign in to comment.