[Android] VideoPLayer: Nullity check

Geoffrey Métais git at videolan.org
Tue Feb 5 18:33:11 CET 2019


vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Tue Feb  5 18:25:04 2019 +0100| [5ea724a10f30eafbb4f666bec154557a17545a8d] | committer: Geoffrey Métais

VideoPLayer: Nullity check

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

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

diff --git a/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java b/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
index fd82f748e..a109af3b9 100644
--- a/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
+++ b/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
@@ -2822,7 +2822,7 @@ public class VideoPlayerActivity extends AppCompatActivity implements IPlaybackS
         @TargetApi(Build.VERSION_CODES.HONEYCOMB)
         @Override
         public void onReceive(Context context, Intent intent) {
-            if (intent == null) return;
+            if (intent == null || mService == null) return;
             switch (intent.getAction()) {
                 case BluetoothA2dp.ACTION_CONNECTION_STATE_CHANGED:
                 case BluetoothHeadset.ACTION_CONNECTION_STATE_CHANGED:



More information about the Android mailing list