Add missing checks for null pointers
This commit is contained in:
@@ -1410,6 +1410,8 @@ hexchat_list_time (hexchat_plugin *ph, hexchat_list *xlist, const char *name)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case LIST_USERS:
|
case LIST_USERS:
|
||||||
|
if (!xlist->pos)
|
||||||
|
return (time_t) -1;
|
||||||
data = xlist->pos->data;
|
data = xlist->pos->data;
|
||||||
switch (hash)
|
switch (hash)
|
||||||
{
|
{
|
||||||
@@ -1431,6 +1433,7 @@ hexchat_list_str (hexchat_plugin *ph, hexchat_list *xlist, const char *name)
|
|||||||
/* a NULL xlist is a shortcut to current "channels" context */
|
/* a NULL xlist is a shortcut to current "channels" context */
|
||||||
if (xlist)
|
if (xlist)
|
||||||
{
|
{
|
||||||
|
if (xlist->pos)
|
||||||
data = xlist->pos->data;
|
data = xlist->pos->data;
|
||||||
type = xlist->type;
|
type = xlist->type;
|
||||||
}
|
}
|
||||||
@@ -1522,6 +1525,7 @@ hexchat_list_int (hexchat_plugin *ph, hexchat_list *xlist, const char *name)
|
|||||||
/* a NULL xlist is a shortcut to current "channels" context */
|
/* a NULL xlist is a shortcut to current "channels" context */
|
||||||
if (xlist)
|
if (xlist)
|
||||||
{
|
{
|
||||||
|
if (xlist->pos)
|
||||||
data = xlist->pos->data;
|
data = xlist->pos->data;
|
||||||
type = xlist->type;
|
type = xlist->type;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user