terminal: check if theme is present to avoid exception on utxo history update

This commit is contained in:
Craig Raw 2023-08-07 12:00:58 +02:00
parent 93bcf6cef9
commit 2d7c5dcec7

View file

@ -192,7 +192,7 @@ public class UtxosDialog extends WalletDialog {
SparrowTerminal.get().getGuiThread().invokeLater(() -> {
TableModel<TableCell> tableModel = getTableModel(walletUtxosEntry);
utxos.setTableModel(tableModel);
if(utxos.getRenderer().getViewTopRow() >= tableModel.getRowCount()) {
if(utxos.getTheme() != null && utxos.getRenderer().getViewTopRow() >= tableModel.getRowCount()) {
utxos.getRenderer().setViewTopRow(0);
}
});