mirror of
https://github.com/TeamNewPipe/NewPipe
synced 2025-02-02 12:19:16 +00:00
fix possible races
This commit is contained in:
parent
360b411503
commit
6456e0c3f2
@ -233,8 +233,8 @@ public abstract class PlayQueue implements Serializable {
|
||||
* @return an immutable view of the play queue
|
||||
*/
|
||||
@NonNull
|
||||
public synchronized List<PlayQueueItem> getStreams() { // todo: iterator race
|
||||
return Collections.unmodifiableList(streams);
|
||||
public synchronized List<PlayQueueItem> getStreams() {
|
||||
return Collections.unmodifiableList(new ArrayList<>(streams));
|
||||
}
|
||||
|
||||
/*//////////////////////////////////////////////////////////////////////////
|
||||
|
Loading…
Reference in New Issue
Block a user