Skip to content

Commit

Permalink
Merge pull request #6289 from jmacxx/fix_npe_payment_method_form
Browse files Browse the repository at this point in the history
Fix NPE in account name creation
  • Loading branch information
ripcurlx authored Jul 12, 2022
2 parents df78de7 + 4351c20 commit 4b24d20
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@

import lombok.extern.slf4j.Slf4j;

import javax.annotation.Nullable;

import static bisq.desktop.util.DisplayUtils.createAccountName;
import static bisq.desktop.util.FormBuilder.*;

Expand Down Expand Up @@ -286,9 +288,9 @@ void applyTradeCurrency(TradeCurrency tradeCurrency, FiatCurrency defaultCurrenc
}
}

void setAccountNameWithString(String name) {
void setAccountNameWithString(@Nullable String name) {
if (useCustomAccountNameToggleButton != null && !useCustomAccountNameToggleButton.isSelected()) {
String accountName = createAccountName(paymentAccount.getPaymentMethod().getId(), name);
String accountName = createAccountName(paymentAccount.getPaymentMethod().getId(), name == null ? "" : name);
accountNameTextField.setText(accountName);
}
}
Expand Down

0 comments on commit 4b24d20

Please sign in to comment.