Mercurial > audlegacy
diff src/audacious/flow.c @ 3563:cc888ce7b6fb trunk
link/unlink fixes
author | William Pitcock <nenolod@atheme.org> |
---|---|
date | Tue, 18 Sep 2007 13:54:22 -0500 |
parents | 5aec9950c47a |
children | 6f4068a0f291 |
line wrap: on
line diff
--- a/src/audacious/flow.c Tue Sep 18 13:51:23 2007 -0500 +++ b/src/audacious/flow.c Tue Sep 18 13:54:22 2007 -0500 @@ -98,6 +98,9 @@ flow->tail->next = element; flow->tail = element; + + if (!flow->head) + flow->head = element; } /* TBD: unlink all elements of func, or just the first --nenolod */ @@ -117,6 +120,12 @@ iter->prev->next = iter->next; + if (flow->tail == iter) + flow->tail = iter->prev; + + if (flow->head == iter) + flow->head = iter->next; + g_slice_free(FlowElement, iter); } }