[Android] Prevent NPE in login dialog

Geoffrey Métais git at videolan.org
Fri Oct 13 16:46:32 CEST 2017


vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Fri Oct 13 16:46:07 2017 +0200| [17bb48b288eeb6ed1da6c8bed0b6e074ea1b3a62] | committer: Geoffrey Métais

Prevent NPE in login dialog

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

 vlc-android/src/org/videolan/vlc/gui/dialogs/VlcDialog.java | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/vlc-android/src/org/videolan/vlc/gui/dialogs/VlcDialog.java b/vlc-android/src/org/videolan/vlc/gui/dialogs/VlcDialog.java
index b09260168..43668558e 100644
--- a/vlc-android/src/org/videolan/vlc/gui/dialogs/VlcDialog.java
+++ b/vlc-android/src/org/videolan/vlc/gui/dialogs/VlcDialog.java
@@ -72,7 +72,8 @@ public abstract class VlcDialog<T extends Dialog, B extends android.databinding.
     @Override
     public void onDestroy() {
         super.onDestroy();
-        mVlcDialog.dismiss();
+        if (mVlcDialog != null)
+            mVlcDialog.dismiss();
         getActivity().finish();
     }
 



More information about the Android mailing list