From 9043df532143a9eb751e2b095ae495ae8a5f054e Mon Sep 17 00:00:00 2001 From: Uday Kiran jandhyala Date: Wed, 21 May 2014 18:44:17 +0530 Subject: Fixed NullPointerException when EXIF data is invalid For some images with no / invalid EXIF data, Gallery crashes Fixed this bug by catching NullPointerException Change-Id: I656fe6d526c981933c3d6eeefe67cda860206e2d --- gallerycommon/src/com/android/gallery3d/exif/ExifInterface.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gallerycommon') diff --git a/gallerycommon/src/com/android/gallery3d/exif/ExifInterface.java b/gallerycommon/src/com/android/gallery3d/exif/ExifInterface.java index a1cf0fc85..87db689e8 100644 --- a/gallerycommon/src/com/android/gallery3d/exif/ExifInterface.java +++ b/gallerycommon/src/com/android/gallery3d/exif/ExifInterface.java @@ -732,7 +732,7 @@ public class ExifInterface { * @param inStream an InputStream containing a jpeg compressed image. * @throws IOException */ - public void readExif(InputStream inStream) throws IOException { + public void readExif(InputStream inStream) throws IOException, NullPointerException { if (inStream == null) { throw new IllegalArgumentException(NULL_ARGUMENT_STRING); } -- cgit v1.2.3