[Android] Prevent NPE

Geoffrey Métais git at videolan.org
Fri Mar 10 16:04:43 CET 2017


vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Fri Mar 10 15:29:35 2017 +0100| [c835ccb2da13817f0284ab8d82f084869efd9d76] | committer: Geoffrey Métais

Prevent NPE

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

 vlc-android/src/org/videolan/vlc/VLCApplication.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/vlc-android/src/org/videolan/vlc/VLCApplication.java b/vlc-android/src/org/videolan/vlc/VLCApplication.java
index 645ee58..fd386c4 100644
--- a/vlc-android/src/org/videolan/vlc/VLCApplication.java
+++ b/vlc-android/src/org/videolan/vlc/VLCApplication.java
@@ -226,7 +226,7 @@ public class VLCApplication extends Application {
 
         @Override
         public void onCanceled(Dialog dialog) {
-            if (dialog != null)
+            if (dialog != null && dialog.getContext() != null)
                 ((DialogFragment)dialog.getContext()).dismiss();
         }
 



More information about the Android mailing list