idnode: better check for p argument in idnode_get_display() - coverity
This commit is contained in:
parent
12be763bee
commit
a1e10f7c5d
1 changed files with 8 additions and 6 deletions
14
src/idnode.c
14
src/idnode.c
|
@ -338,12 +338,14 @@ static char *
|
|||
idnode_get_display
|
||||
( idnode_t *self, const property_t *p )
|
||||
{
|
||||
if (p->rend)
|
||||
return p->rend(self);
|
||||
if (p->islist) {
|
||||
htsmsg_t *l = (htsmsg_t*)p->get(self);
|
||||
if (l)
|
||||
return htsmsg_list_2_csv(l);
|
||||
if (p) {
|
||||
if (p->rend)
|
||||
return p->rend(self);
|
||||
if (p->islist) {
|
||||
htsmsg_t *l = (htsmsg_t*)p->get(self);
|
||||
if (l)
|
||||
return htsmsg_list_2_csv(l);
|
||||
}
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue