Skip to content

Commit

Permalink
Fix ViewDemuxingTaskQueue#peek/poll, both may return null (fixes #28)
Browse files Browse the repository at this point in the history
Apparently Xaero's Minimap needs those to clear the queue, no idea why
and that seems like a horrible idea but who am I to judge.
  • Loading branch information
Johni0702 committed May 30, 2019
1 parent 6092abb commit b41cfbc
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ internal class ViewDemuxingTaskQueue(

override fun offer(p0: FutureTask<*>): Boolean = backingQueue.offer(wrapTask(p0))
override fun iterator(): MutableIterator<FutureTask<*>> = backingQueue.iterator()
override fun peek(): FutureTask<*> = backingQueue.peek()
override fun poll(): FutureTask<*> = backingQueue.poll()
override fun peek(): FutureTask<*>? = backingQueue.peek()
override fun poll(): FutureTask<*>? = backingQueue.poll()
override fun isEmpty(): Boolean = backingQueue.isEmpty()
override val size: Int get() = backingQueue.size
}

0 comments on commit b41cfbc

Please sign in to comment.