Prevent crash if URI is null
This commit is contained in:
parent
684052c7b6
commit
389b40f637
1 changed files with 6 additions and 4 deletions
|
@ -151,10 +151,12 @@ public class ContactAvatar {
|
||||||
|
|
||||||
Bitmap bm = null;
|
Bitmap bm = null;
|
||||||
try {
|
try {
|
||||||
|
if (contact.getThumbnailUri() != null) {
|
||||||
bm =
|
bm =
|
||||||
MediaStore.Images.Media.getBitmap(
|
MediaStore.Images.Media.getBitmap(
|
||||||
LinphoneService.instance().getContentResolver(),
|
LinphoneService.instance().getContentResolver(),
|
||||||
contact.getThumbnailUri());
|
contact.getThumbnailUri());
|
||||||
|
}
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
Log.e(e);
|
Log.e(e);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue