# HG changeset patch # User ib # Date 1355106475 0 # Node ID 069de6f47ec13c4637241e3eca4ddb467c00c4d2 # Parent 5cccc59f4c5b4b67fa403c0a4e222e854bac8de0 Simplify code. Call listMgr(PLAYLIST_ITEM_GET_CURR, 0) only once. diff -r 5cccc59f4c5b -r 069de6f47ec1 gui/interface.c --- a/gui/interface.c Mon Dec 10 02:25:03 2012 +0000 +++ b/gui/interface.c Mon Dec 10 02:27:55 2012 +0000 @@ -845,10 +845,12 @@ guiInfo.Angle = 1; if (isPlaylistStreamtype) { - if (!listMgr(PLAYLIST_ITEM_GET_CURR, 0)) + plItem *curr = listMgr(PLAYLIST_ITEM_GET_CURR, 0); + + if (!curr) uiUnsetFile(); - else if (listMgr(PLAYLIST_ITEM_GET_CURR, 0) != listMgr(PLAYLIST_GET, 0)) { - plItem *curr = listMgr(PLAYLIST_ITEM_SET_CURR, listMgr(PLAYLIST_GET, 0)); + else if (curr != listMgr(PLAYLIST_GET, 0)) { + curr = listMgr(PLAYLIST_ITEM_SET_CURR, listMgr(PLAYLIST_GET, 0)); uiSetFile(curr->path, curr->name, STREAMTYPE_FILE); guiInfo.Track = 1; }