[Android] Prevent NPE
Geoffrey Métais
git at videolan.org
Tue Feb 17 17:43:46 CET 2015
vlc-ports/android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Tue Feb 17 12:22:38 2015 +0100| [2b8ccdaa4052b99ef6414790e94c5c82ee58e6a3] | committer: Geoffrey Métais
Prevent NPE
CID #1270669
> http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=2b8ccdaa4052b99ef6414790e94c5c82ee58e6a3
---
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 e836ea1..b405bed 100644
--- a/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
+++ b/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
@@ -793,7 +793,7 @@ public class VideoPlayerActivity extends ActionBarActivity implements IVideoPlay
float dpadx = event.getAxisValue(MotionEvent.AXIS_HAT_X);
float dpady = event.getAxisValue(MotionEvent.AXIS_HAT_Y);
- if (Math.abs(dpadx) == 1.0f || Math.abs(dpady) == 1.0f)
+ if (mInputDevice == null || Math.abs(dpadx) == 1.0f || Math.abs(dpady) == 1.0f)
return false;
float x = AndroidDevices.getCenteredAxis(event, mInputDevice,
More information about the Android
mailing list