[Android] Network browser: Sanity check

Geoffrey Métais git at videolan.org
Tue May 7 14:39:46 CEST 2019


vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Tue May  7 14:36:47 2019 +0200| [c2f8e42f1e8bf5725c7656fb0d375588fd904d3d] | committer: Geoffrey Métais

Network browser: Sanity check

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

 .../src/org/videolan/vlc/gui/browser/NetworkBrowserFragment.kt        | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/vlc-android/src/org/videolan/vlc/gui/browser/NetworkBrowserFragment.kt b/vlc-android/src/org/videolan/vlc/gui/browser/NetworkBrowserFragment.kt
index a73fb4f06..faa2b9430 100644
--- a/vlc-android/src/org/videolan/vlc/gui/browser/NetworkBrowserFragment.kt
+++ b/vlc-android/src/org/videolan/vlc/gui/browser/NetworkBrowserFragment.kt
@@ -179,10 +179,10 @@ class NetworkBrowserFragment : BaseBrowserFragment() {
     }
 
     private fun showAddServerDialog(mw: MediaWrapper?) {
-        val fm = fragmentManager
+        val fm = fragmentManager ?: return
         val dialog = NetworkServerDialog()
         if (mw != null) dialog.setServer(mw)
-        dialog.show(fm!!, "fragment_add_server")
+        dialog.show(fm, "fragment_add_server")
     }
 
     override fun onUpdateFinished(adapter: RecyclerView.Adapter<*>) {



More information about the Android mailing list