[Android] Prevent NPE in video player
Geoffrey Métais
git at videolan.org
Wed Dec 2 16:35:11 CET 2015
vlc-ports/android | branch: 1.7.x | Geoffrey Métais <geoffrey.metais at gmail.com> | Wed Dec 2 16:30:35 2015 +0100| [27004e0f4d1dcc045e4cadbe54c3c4bcf99c83a4] | committer: Geoffrey Métais
Prevent NPE in video player
> http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=27004e0f4d1dcc045e4cadbe54c3c4bcf99c83a4
---
.../src/org/videolan/vlc/gui/video/VideoPlayerActivity.java | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
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 ad90784..d5379d5 100644
--- a/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
+++ b/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
@@ -1277,7 +1277,7 @@ public class VideoPlayerActivity extends AppCompatActivity implements IVLCVout.C
* @param duration
*/
private void showInfo(String text, int duration) {
- if (mPresentation == null)
+ if (mPresentation == null && mVerticalBar != null)
mVerticalBar.setVisibility(View.GONE);
mInfo.setVisibility(View.VISIBLE);
mInfo.setText(text);
@@ -1286,7 +1286,7 @@ public class VideoPlayerActivity extends AppCompatActivity implements IVLCVout.C
}
private void showInfo(int textid, int duration) {
- if (mPresentation == null)
+ if (mPresentation == null && mVerticalBar != null)
mVerticalBar.setVisibility(View.GONE);
mInfo.setVisibility(View.VISIBLE);
mInfo.setText(textid);
@@ -1315,7 +1315,7 @@ public class VideoPlayerActivity extends AppCompatActivity implements IVLCVout.C
VideoPlayerActivity.this, android.R.anim.fade_out));
mInfo.setVisibility(View.INVISIBLE);
- if (mPresentation == null) {
+ if (mPresentation == null && mVerticalBar != null) {
if (mVerticalBar.getVisibility() == View.VISIBLE) {
mVerticalBar.startAnimation(AnimationUtils.loadAnimation(
VideoPlayerActivity.this, android.R.anim.fade_out));
More information about the Android
mailing list