fix npe duplicating offer with deleted payment account
This commit is contained in:
parent
e6b29b88f5
commit
c333803917
1 changed files with 5 additions and 1 deletions
|
@ -79,7 +79,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());
|
||||
|
|
Loading…
Reference in a new issue