Skip to content

Commit 927442a

Browse files
committed
Fixed #236
1 parent 2a8391d commit 927442a

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

core/src/main/java/xyz/gianlu/librespot/player/playback/PlayerQueue.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -180,13 +180,15 @@ boolean swap(@NotNull PlayerQueueEntry oldEntry, @NotNull PlayerQueueEntry newEn
180180

181181
void clear() {
182182
if (prev != null) {
183-
if (prev != this) prev.clear();
183+
Entry tmp = prev;
184184
prev = null;
185+
if (tmp != this) tmp.clear();
185186
}
186187

187188
if (next != null) {
188-
if (next != this) next.clear();
189+
Entry tmp = next;
189190
next = null;
191+
if (tmp != this) tmp.clear();
190192
}
191193

192194
((PlayerQueueEntry) this).close();

0 commit comments

Comments
 (0)