Crash when deleting a video
Description
When deleting a video, VLC crashes and restart.
Here is the exception in logcat : java.lang.NullPointerException: Attempt to invoke virtual method 'void org.videolan.medialibrary.interfaces.media.MediaWrapper.removeThumbnail()' on a null object reference at org.videolan.vlc.viewmodels.CallBackDelegate.deleteThumbnail(CallBackDelegate.kt:133)
It happens since !1766 (merged). That's probably because in OnMediaDeleted, the media is already deleted, so medialibrary.getMedia will return null.
Steps to reproduce
- Just delete a video
Context
App version
Latest master
Android version
Android 10 / 13
Device model
Sony Xperia XZ2 / Samsung Tab S7FE