[Android] Folders: Prevent NPE

Geoffrey Métais git at videolan.org
Fri Jan 11 17:29:46 CET 2019


vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Fri Jan 11 16:58:56 2019 +0100| [80a827fa21b94b0d782dd0ce132a7cc333e7c42a] | committer: Geoffrey Métais

Folders: Prevent NPE

> https://code.videolan.org/videolan/vlc-android/commit/80a827fa21b94b0d782dd0ce132a7cc333e7c42a
---

 vlc-android/src/org/videolan/vlc/gui/folders/FoldersFragment.kt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/vlc-android/src/org/videolan/vlc/gui/folders/FoldersFragment.kt b/vlc-android/src/org/videolan/vlc/gui/folders/FoldersFragment.kt
index 4a48e5dc1..95a7dd0e2 100644
--- a/vlc-android/src/org/videolan/vlc/gui/folders/FoldersFragment.kt
+++ b/vlc-android/src/org/videolan/vlc/gui/folders/FoldersFragment.kt
@@ -71,7 +71,7 @@ class FoldersFragment : MediaBrowserFragment<PagedFoldersModel>(), CoroutineScop
             adapter = FoldersAdapter(actor)
             viewModel = ViewModelProviders.of(requireActivity(), PagedFoldersModel.Factory(requireContext(), Folder.TYPE_FOLDER_VIDEO)).get(PagedFoldersModel::class.java)
             viewModel.pagedList.observe(requireActivity(), Observer {
-                mSwipeRefreshLayout.isRefreshing = false
+                mSwipeRefreshLayout?.isRefreshing = false
                 adapter.submitList(it)
             })
         }



More information about the Android mailing list