VideoListAdapter: crash when removing the sd card with videos grouped by folder
Description
When videos are grouped by folder, and some media are present on the sd card, removing it will cause a crash:
2023-02-16 11:52:46.633 15447-15511/org.videolan.vlc.debug E/AndroidRuntime: FATAL EXCEPTION: pool-2-thread-2
Process: org.videolan.vlc.debug, PID: 15447
java.lang.NullPointerException: Parameter specified as non-null is null: method kotlin.jvm.internal.Intrinsics.checkNotNullParameter, parameter newItem
at org.videolan.vlc.gui.video.VideoListAdapter$VideoItemDiffCallback.areItemsTheSame(Unknown Source:7)
at org.videolan.vlc.gui.video.VideoListAdapter$VideoItemDiffCallback.areItemsTheSame(VideoListAdapter.kt:239)
at androidx.paging.NullPaddedListDiffHelperKt$computeDiff$diffResult$1.areItemsTheSame(NullPaddedListDiffHelper.kt:67)
at androidx.recyclerview.widget.DiffUtil.backward(DiffUtil.java:300)
at androidx.recyclerview.widget.DiffUtil.midPoint(DiffUtil.java:202)
at androidx.recyclerview.widget.DiffUtil.calculateDiff(DiffUtil.java:146)
at androidx.paging.NullPaddedListDiffHelperKt.computeDiff(NullPaddedListDiffHelper.kt:45)
at androidx.paging.AsyncPagedListDiffer$submitList$2.run(AsyncPagedListDiffer.kt:425)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1137)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:637)
at java.lang.Thread.run(Thread.java:1012)
2023-02-16 11:52:46.633 15447-15511/org.videolan.vlc.debug E/VLC/VlcCrashHandler: java.lang.NullPointerException: Parameter specified as non-null is null: method kotlin.jvm.internal.Intrinsics.checkNotNullParameter, parameter newItem
at org.videolan.vlc.gui.video.VideoListAdapter$VideoItemDiffCallback.areItemsTheSame(Unknown Source:7)
at org.videolan.vlc.gui.video.VideoListAdapter$VideoItemDiffCallback.areItemsTheSame(VideoListAdapter.kt:239)
at androidx.paging.NullPaddedListDiffHelperKt$computeDiff$diffResult$1.areItemsTheSame(NullPaddedListDiffHelper.kt:67)
at androidx.recyclerview.widget.DiffUtil.backward(DiffUtil.java:300)
at androidx.recyclerview.widget.DiffUtil.midPoint(DiffUtil.java:202)
at androidx.recyclerview.widget.DiffUtil.calculateDiff(DiffUtil.java:146)
at androidx.paging.NullPaddedListDiffHelperKt.computeDiff(NullPaddedListDiffHelper.kt:45)
at androidx.paging.AsyncPagedListDiffer$submitList$2.run(AsyncPagedListDiffer.kt:425)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1137)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:637)
at java.lang.Thread.run(Thread.java:1012)
at Android.MODEL(XQ-CC54)
at Android.VERSION(13)
at Android.FINGERPRINT(Sony/XQ-CC54_EEA/XQ-CC54:13/65.1.A.4.8/065001A004000803491578438:user/release-keys)
Context
Master / 3.5.4 Beta 3
App version
Android version
Android 13
App mode
Smartphone