fix adding results from searching in current playlist
previously, pointers to items in playlist were added to list. this is utterly wrong as playlist can change at any time, so if song is from playlist, duplicate it.
This commit is contained in:
@@ -286,7 +286,8 @@ void Search(SearchPattern s)
|
|||||||
|
|
||||||
if (found && any_found)
|
if (found && any_found)
|
||||||
{
|
{
|
||||||
mSearcher->AddOption(make_pair((Buffer *)0, *it));
|
Song *ss = Config.search_in_db ? *it : new Song(**it);
|
||||||
|
mSearcher->AddOption(make_pair((Buffer *)0, ss));
|
||||||
list[it-list.begin()] = 0;
|
list[it-list.begin()] = 0;
|
||||||
}
|
}
|
||||||
found = 1;
|
found = 1;
|
||||||
|
|||||||
Reference in New Issue
Block a user