From 3a014d8d46a15935b403fe3fe5e4f74fb9976613 Mon Sep 17 00:00:00 2001 From: Stypox Date: Wed, 27 Mar 2024 16:05:17 +0100 Subject: [PATCH] Fix not considering nullability when comparing getAudioTrackType --- app/src/main/java/org/schabi/newpipe/util/ListHelper.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/org/schabi/newpipe/util/ListHelper.java b/app/src/main/java/org/schabi/newpipe/util/ListHelper.java index 7cb8f1f37..f1904565d 100644 --- a/app/src/main/java/org/schabi/newpipe/util/ListHelper.java +++ b/app/src/main/java/org/schabi/newpipe/util/ListHelper.java @@ -874,6 +874,7 @@ public final class ListHelper { return Comparator.comparing(AudioStream::getAudioLocale, Comparator.nullsLast( Comparator.comparing(locale -> locale.getDisplayName(appLoc)))) - .thenComparing(AudioStream::getAudioTrackType); + .thenComparing(AudioStream::getAudioTrackType, Comparator.nullsLast( + Comparator.naturalOrder())); } }