Fix issue #269, prevent a NullReference exception by checking if the object is null before using it

This commit is contained in:
dethstar
2015-12-24 12:34:01 -06:00
parent f22badeaae
commit 5997cfb5ca
@@ -113,6 +113,9 @@ public class ImageUtils {
Cursor cursor = context.getContentResolver().query(
photoUri, new String[]{MediaStore.Images.ImageColumns.ORIENTATION}, null, null, null
);
if (cursor == null) {
return 0;
}
if (cursor.moveToFirst()) {
result = cursor.getInt(0);
} else {