# HG changeset patch # User William Pitcock # Date 1190141662 18000 # Node ID cc888ce7b6fb0ff91992aae82d197cf4052bf24b # Parent 1caa559c56199ccb1e3a4490fcaac67440da3a31 link/unlink fixes diff -r 1caa559c5619 -r cc888ce7b6fb src/audacious/flow.c --- 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); } }