mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2026-01-24 08:40:25 +01:00
list.h: don't crash when removing an element from a NULL list
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Keith Packard <keithp@keithp.com>
(cherry picked from commit 167993254a)
This commit is contained in:
parent
7197c1c571
commit
31ca2e2d5d
1 changed files with 1 additions and 1 deletions
|
|
@ -453,7 +453,7 @@ xorg_list_is_empty(struct xorg_list *head)
|
|||
#define nt_list_del(_entry, _list, _type, _member) \
|
||||
do { \
|
||||
_type *__e = _entry; \
|
||||
if (__e == NULL) break; \
|
||||
if (__e == NULL || _list == NULL) break; \
|
||||
if ((_list) == __e) { \
|
||||
_list = __e->_member; \
|
||||
} else { \
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue