Skip to content

Commit

Permalink
fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
nift4 authored Nov 1, 2024
1 parent 6e80fd0 commit 8299598
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,8 @@ class MediaControllerViewModel(application: Application) : AndroidViewModel(appl
): ListenableFuture<SessionResult> {
var future: ListenableFuture<SessionResult>? = null
val listenerIterator = customCommandListenersImpl.iterator()
while (future == null || (future.isDone &&
future.get().resultCode == SessionResult.RESULT_ERROR_NOT_SUPPORTED)) {
while (listenerIterator.hasNext() && (future == null || (future.isDone &&
future.get().resultCode == SessionResult.RESULT_ERROR_NOT_SUPPORTED))) {
future = listenerIterator.next()(controller, command, args)
}
return future
Expand Down

0 comments on commit 8299598

Please sign in to comment.