Merge "Null pointer protection in AudioPreview.java for Music app"
diff --git a/src/com/android/music/AudioPreview.java b/src/com/android/music/AudioPreview.java
old mode 100644
new mode 100755
index 846ed14..3f22c6c
--- a/src/com/android/music/AudioPreview.java
+++ b/src/com/android/music/AudioPreview.java
@@ -333,6 +333,10 @@
             if (!fromuser) {
                 return;
             }
+            // Protection for case of simultaneously tapping on seek bar and exit
+            if (mPlayer == null) {
+                return;
+            }
             mPlayer.seekTo(progress);
         }
         public void onStopTrackingTouch(SeekBar bar) {
@@ -352,6 +356,10 @@
     }
 
     public void playPauseClicked(View v) {
+        // Protection for case of simultaneously tapping on play/pause and exit
+        if (mPlayer == null) {
+            return;
+        }
         if (mPlayer.isPlaying()) {
             mPlayer.pause();
         } else {