Fix Gallery keeps stopping issue when edit and save a picture.

Edit picture in Gallery, meet "Gallery keeps stopping" when try to save
picture.
E AndroidRuntime: Process: com.android.gallery3d, PID: 3740
E AndroidRuntime: java.lang.NullPointerException: Attempt to invoke virtual method
'boolean java.lang.String.equals(java.lang.Object)' on a null object reference
E AndroidRuntime: 	at com.android.gallery3d.filtershow.tools.SaveImage.getExifData(SaveImage.java:250)
E AndroidRuntime: 	at com.android.gallery3d.filtershow.tools.SaveImage.processAndSaveImage(SaveImage.java:369)

Add nullpointer check to avoid crash.

Signed-off-by: Jessie Hao <juan.hao@nxp.com>
Change-Id: Ia41dffa6a2bbeadd6121293b0eea78a268347778
diff --git a/src/com/android/gallery3d/filtershow/tools/SaveImage.java b/src/com/android/gallery3d/filtershow/tools/SaveImage.java
index f10e628..5b212d7 100755
--- a/src/com/android/gallery3d/filtershow/tools/SaveImage.java
+++ b/src/com/android/gallery3d/filtershow/tools/SaveImage.java
@@ -264,7 +264,7 @@
         if (mimeType == null) {
             mimeType = ImageLoader.getMimeType(mSelectedImageUri);
         }
-        if (mimeType.equals(ImageLoader.JPEG_MIME_TYPE)) {
+        if ((mimeType != null) && mimeType.equals(ImageLoader.JPEG_MIME_TYPE)) {
             InputStream inStream = null;
             try {
                 inStream = mContext.getContentResolver().openInputStream(source);