[Android] Browser: prevent access to uninitialized variable
Geoffrey Métais
git at videolan.org
Fri Aug 2 14:47:03 CEST 2019
vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Fri Aug 2 14:36:35 2019 +0200| [109c99e95c01584656826a969131f410e7e27154] | committer: Geoffrey Métais
Browser: prevent access to uninitialized variable
> https://code.videolan.org/videolan/vlc-android/commit/109c99e95c01584656826a969131f410e7e27154
---
vlc-android/src/org/videolan/vlc/providers/BrowserProvider.kt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/vlc-android/src/org/videolan/vlc/providers/BrowserProvider.kt b/vlc-android/src/org/videolan/vlc/providers/BrowserProvider.kt
index d384030a2..2bdb0912c 100644
--- a/vlc-android/src/org/videolan/vlc/providers/BrowserProvider.kt
+++ b/vlc-android/src/org/videolan/vlc/providers/BrowserProvider.kt
@@ -178,7 +178,7 @@ abstract class BrowserProvider(val context: Context, val dataset: LiveDataset<Me
var currentParsedPosition = -1
loop@ while (++currentParsedPosition < currentMediaList.size) {
if (!isActive) {
- browserChannel.close()
+ if (::browserChannel.isInitialized) browserChannel.close()
break at loop
}
//skip media that are not browsable
More information about the Android
mailing list