Commit 16799325 authored by Peter Hutterer's avatar Peter Hutterer Committed by Keith Packard
Browse files

list.h: don't crash when removing an element from a NULL list


Signed-off-by: Peter Hutterer's avatarPeter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Keith Packard's avatarKeith Packard <keithp@keithp.com>
parent 8aa6d49d
......@@ -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 { \
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment