[Android] Fix NullPointerException
Nicolas Pomepuy
git at videolan.org
Wed Aug 5 14:29:59 CEST 2020
vlc-android | branch: master | Nicolas Pomepuy <nicolas at videolabs.io> | Wed Aug 5 08:11:57 2020 +0200| [da66595015fd4a18b70aa1a30cbcaad78e1ca1a5] | committer: Nicolas Pomepuy
Fix NullPointerException
> https://code.videolan.org/videolan/vlc-android/commit/da66595015fd4a18b70aa1a30cbcaad78e1ca1a5
---
application/vlc-android/src/org/videolan/vlc/gui/network/MRLAdapter.kt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/application/vlc-android/src/org/videolan/vlc/gui/network/MRLAdapter.kt b/application/vlc-android/src/org/videolan/vlc/gui/network/MRLAdapter.kt
index 37fa51253..51c0ba439 100644
--- a/application/vlc-android/src/org/videolan/vlc/gui/network/MRLAdapter.kt
+++ b/application/vlc-android/src/org/videolan/vlc/gui/network/MRLAdapter.kt
@@ -56,7 +56,7 @@ internal class MRLAdapter(private val eventActor: SendChannel<MrlAction>, privat
}
override fun getItemViewType(position: Int) = when {
- dataset[position].id < 0 -> TYPE_DUMMY
+ dataset[position] != null && dataset[position].id < 0 -> TYPE_DUMMY
inCards -> TYPE_CARD
else -> TYPE_LIST
}
More information about the Android
mailing list