mirror of
https://github.com/TeamNewPipe/NewPipe
synced 2025-04-27 05:03:19 +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
|
* @return an immutable view of the play queue
|
||||||
*/
|
*/
|
||||||
@NonNull
|
@NonNull
|
||||||
public synchronized List<PlayQueueItem> getStreams() { // todo: iterator race
|
public synchronized List<PlayQueueItem> getStreams() {
|
||||||
return Collections.unmodifiableList(streams);
|
return Collections.unmodifiableList(new ArrayList<>(streams));
|
||||||
}
|
}
|
||||||
|
|
||||||
/*//////////////////////////////////////////////////////////////////////////
|
/*//////////////////////////////////////////////////////////////////////////
|
||||||
|
Loading…
x
Reference in New Issue
Block a user