Skip to content

Commit

Permalink
make sure data is not null
Browse files Browse the repository at this point in the history
  • Loading branch information
or-else committed Sep 3, 2019
1 parent 5982d2c commit f3bfee3
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions app/src/main/java/co/tinode/tindroid/UiUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -468,6 +468,10 @@ static Bitmap scaleBitmap(Bitmap bmp) {
}

private static Bitmap extractBitmap(final Activity activity, final Intent data) {
if (data == null) {
return null;
}

try {
return MediaStore.Images.Media.getBitmap(activity.getContentResolver(),
data.getData());
Expand Down

0 comments on commit f3bfee3

Please sign in to comment.