[Android] Network browser: Prevent NPE
Geoffrey Métais
git at videolan.org
Fri Jun 29 14:56:56 CEST 2018
vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Fri Jun 29 14:56:26 2018 +0200| [a6bf3f38f30aaaf8b0214fc589699c88f45a60eb] | committer: Geoffrey Métais
Network browser: Prevent NPE
> https://code.videolan.org/videolan/vlc-android/commit/a6bf3f38f30aaaf8b0214fc589699c88f45a60eb
---
.../src/org/videolan/vlc/gui/browser/NetworkBrowserFragment.java | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/vlc-android/src/org/videolan/vlc/gui/browser/NetworkBrowserFragment.java b/vlc-android/src/org/videolan/vlc/gui/browser/NetworkBrowserFragment.java
index 19e698e91..baeff3fe3 100644
--- a/vlc-android/src/org/videolan/vlc/gui/browser/NetworkBrowserFragment.java
+++ b/vlc-android/src/org/videolan/vlc/gui/browser/NetworkBrowserFragment.java
@@ -212,7 +212,8 @@ public class NetworkBrowserFragment extends BaseBrowserFragment implements Simpl
*/
protected void updateEmptyView() {
if (getBinding() == null) return;
- if (ExternalMonitor.connected.getValue()) {
+ final Boolean connected = ExternalMonitor.connected.getValue();
+ if (connected != null && connected.booleanValue()) {
if (Util.isListEmpty(getViewModel().getDataset().getValue())) {
if (mSwipeRefreshLayout == null || mSwipeRefreshLayout.isRefreshing()) {
getBinding().empty.setText(R.string.loading);
More information about the Android
mailing list