Fix NPE when duplicate offer with deleted account

This commit is contained in:
xyzmaker123 2022-06-01 10:49:32 +02:00
parent a62655c15d
commit 09f23f3b6c
No known key found for this signature in database
GPG key ID: 47689699B7B0AAFC

View file

@ -92,7 +92,11 @@ class DuplicateOfferDataModel extends MutableOfferDataModel {
public void populateData(Offer offer) {
if (offer == null)
return;
paymentAccount = user.getPaymentAccount(offer.getMakerPaymentAccountId());
PaymentAccount account = user.getPaymentAccount(offer.getMakerPaymentAccountId());
if (account != null) {
this.paymentAccount = account;
}
setMinAmount(offer.getMinAmount());
setAmount(offer.getAmount());
setPrice(offer.getPrice());