Check mCurrentThumbRequest.mPath to prevent crash.

Bug: 19246412

Change-Id: I25c2f09ded0527ac062d9c8a57adf3aa7639ea76
diff --git a/src/com/android/providers/media/MediaProvider.java b/src/com/android/providers/media/MediaProvider.java
index ee4aad3..c96028e 100755
--- a/src/com/android/providers/media/MediaProvider.java
+++ b/src/com/android/providers/media/MediaProvider.java
@@ -619,24 +619,26 @@
                         Log.w(TAG, "Have message but no request?");
                     } else {
                         try {
-                            File origFile = new File(mCurrentThumbRequest.mPath);
-                            if (origFile.exists() && origFile.length() > 0) {
-                                mCurrentThumbRequest.execute();
-                                // Check if more requests for the same image are queued.
-                                synchronized (mMediaThumbQueue) {
-                                    for (MediaThumbRequest mtq : mMediaThumbQueue) {
-                                        if ((mtq.mOrigId == mCurrentThumbRequest.mOrigId) &&
-                                            (mtq.mIsVideo == mCurrentThumbRequest.mIsVideo) &&
-                                            (mtq.mMagic == 0) &&
-                                            (mtq.mState == MediaThumbRequest.State.WAIT)) {
-                                            mtq.mMagic = mCurrentThumbRequest.mMagic;
+                            if (mCurrentThumbRequest.mPath != null) {
+                                File origFile = new File(mCurrentThumbRequest.mPath);
+                                if (origFile.exists() && origFile.length() > 0) {
+                                    mCurrentThumbRequest.execute();
+                                    // Check if more requests for the same image are queued.
+                                    synchronized (mMediaThumbQueue) {
+                                        for (MediaThumbRequest mtq : mMediaThumbQueue) {
+                                            if ((mtq.mOrigId == mCurrentThumbRequest.mOrigId) &&
+                                                (mtq.mIsVideo == mCurrentThumbRequest.mIsVideo) &&
+                                                (mtq.mMagic == 0) &&
+                                                (mtq.mState == MediaThumbRequest.State.WAIT)) {
+                                                mtq.mMagic = mCurrentThumbRequest.mMagic;
+                                            }
                                         }
                                     }
-                                }
-                            } else {
-                                // original file hasn't been stored yet
-                                synchronized (mMediaThumbQueue) {
-                                    Log.w(TAG, "original file hasn't been stored yet: " + mCurrentThumbRequest.mPath);
+                                } else {
+                                    // original file hasn't been stored yet
+                                    synchronized (mMediaThumbQueue) {
+                                        Log.w(TAG, "original file hasn't been stored yet: " + mCurrentThumbRequest.mPath);
+                                    }
                                 }
                             }
                         } catch (IOException ex) {