Add missing null check

Fixes #784
This commit is contained in:
AsamK 2021-10-18 16:48:07 +02:00
parent bff0030aed
commit d4b9356c5c

View file

@ -1081,11 +1081,12 @@ public class ManagerImpl implements Manager {
}
final var address = account.getRecipientStore().resolveRecipientAddress(identityInfo.getRecipientId());
final var scannableFingerprint = identityHelper.computeSafetyNumberForScanning(identityInfo.getRecipientId(),
identityInfo.getIdentityKey());
return new Identity(address,
identityInfo.getIdentityKey(),
identityHelper.computeSafetyNumber(identityInfo.getRecipientId(), identityInfo.getIdentityKey()),
identityHelper.computeSafetyNumberForScanning(identityInfo.getRecipientId(),
identityInfo.getIdentityKey()).getSerialized(),
scannableFingerprint == null ? null : scannableFingerprint.getSerialized(),
identityInfo.getTrustLevel(),
identityInfo.getDateAdded());
}