# HG changeset patch # User ib # Date 1329999957 0 # Node ID 45b2c7bbec604cebaa959823f952741ab8fb9aa3 # Parent a99f159b137db9038f4c6ea5d28698483f76a48f Revise listMgr() command PLAYLIST_ITEM_INSERT. Remove unnecessary variable curr. Additionally, some cosmetic formatting changes. diff -r a99f159b137d -r 45b2c7bbec60 gui/util/list.c --- a/gui/util/list.c Thu Feb 23 11:44:49 2012 +0000 +++ b/gui/util/list.c Thu Feb 23 12:25:57 2012 +0000 @@ -59,16 +59,17 @@ return plCurrent; case PLAYLIST_ITEM_INSERT: + if (plCurrent) { - plItem *curr = plCurrent; - pdat->next = curr->next; + pdat->next = plCurrent->next; if (pdat->next) pdat->next->prev = pdat; - pdat->prev = curr; - curr->next = pdat; - plCurrent = plCurrent->next; + pdat->prev = plCurrent; + plCurrent->next = pdat; + + plCurrent = pdat; return plCurrent; } else