--- wmgeneral/list.c.orig Tue May 19 23:13:23 1998 +++ wmgeneral/list.c Tue Oct 10 21:59:35 2000 @@ -44,8 +44,11 @@ list_cons(void* head, LinkedList* tail) LinkedList* cell; cell = (LinkedList*)malloc(sizeof(LinkedList)); - cell->head = head; - cell->tail = tail; + if (cell) + { + cell->head = head; + cell->tail = tail; + } return cell; } @@ -84,6 +87,7 @@ list_nth(int index, LinkedList* list) INLINE void list_remove_head(LinkedList** list) { + if (!list) return; if (!*list) return; if ((*list)->tail) {