Fix crash in history view

This commit is contained in:
Erwan Croze 2019-01-29 09:17:01 +01:00
parent 67bb96a4ab
commit 8844d0edde

View file

@ -173,7 +173,7 @@ public class HistoryDetailFragment extends Fragment implements OnClickListener {
} else if (securityLevel == ChatRoomSecurityLevel.Encrypted) {
contactPicture.setImageResource(R.drawable.avatar_medium_secure1);
} else {
ZrtpPeerStatus zrtpStatus = getZrtpStatus(LinphoneManager.getLc(), contact.getFriend().getAddress().asStringUriOnly());
ZrtpPeerStatus zrtpStatus = getZrtpStatus(LinphoneManager.getLc(), (contact != null) ? contact.getFriend().getAddress().asStringUriOnly() : lAddress.asStringUriOnly());
if (zrtpStatus == ZrtpPeerStatus.Valid) {
contactPicture.setImageResource(R.drawable.avatar_medium_secure2);
} else if (zrtpStatus == ZrtpPeerStatus.Invalid) {