Prevent crash if URI is null

This commit is contained in:
Sylvain Berfini 2019-03-06 09:31:00 +01:00
parent 684052c7b6
commit 389b40f637

View file

@ -151,10 +151,12 @@ public class ContactAvatar {
Bitmap bm = null; Bitmap bm = null;
try { try {
bm = if (contact.getThumbnailUri() != null) {
MediaStore.Images.Media.getBitmap( bm =
LinphoneService.instance().getContentResolver(), MediaStore.Images.Media.getBitmap(
contact.getThumbnailUri()); LinphoneService.instance().getContentResolver(),
contact.getThumbnailUri());
}
} catch (IOException e) { } catch (IOException e) {
Log.e(e); Log.e(e);
} }