forked from upstream-mirrors/quik
Fix issue #269, prevent a NullReference exception by checking if the object is null before using it
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user