[Android] Prevent NPE on vlc dialogs

Geoffrey Métais git at videolan.org
Wed Jun 22 12:03:17 CEST 2016


vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Wed Jun 22 10:58:49 2016 +0200| [402c19922d4ca8088fc4e0cfbf43dfc1e9116a32] | committer: Geoffrey Métais

Prevent NPE on vlc dialogs

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

 libvlc/src/org/videolan/libvlc/Dialog.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libvlc/src/org/videolan/libvlc/Dialog.java b/libvlc/src/org/videolan/libvlc/Dialog.java
index e7b13e4..58e718d 100644
--- a/libvlc/src/org/videolan/libvlc/Dialog.java
+++ b/libvlc/src/org/videolan/libvlc/Dialog.java
@@ -453,7 +453,7 @@ public abstract class Dialog {
             public void run() {
                 if (dialog instanceof IdDialog)
                     ((IdDialog) dialog).dismiss();
-                if (sCallbacks != null)
+                if (sCallbacks != null && dialog != null)
                     sCallbacks.onCanceled(dialog);
             }
         });



More information about the Android mailing list