mirror of
https://github.com/bisq-network/bisq.git
synced 2025-02-22 22:45:21 +01:00
Prevent NullPointerException in ProposalsView
When activating the ProposalsView, the table height is updated on the user thread. Sometimes the scene is unavailable and causes a NullPointerException. This should at least prevent the exception. Fixes #2883 and #3116
This commit is contained in:
parent
f2f62c7033
commit
b095086204
1 changed files with 4 additions and 1 deletions
|
@ -209,7 +209,10 @@ public class ProposalsView extends ActivatableView<GridPane, Void> implements Bs
|
|||
sortedList.comparatorProperty().bind(tableView.comparatorProperty());
|
||||
tableView.setPrefHeight(100);
|
||||
root.getScene().heightProperty().addListener(sceneHeightListener);
|
||||
UserThread.execute(() -> updateTableHeight(root.getScene().getHeight()));
|
||||
UserThread.execute(() -> {
|
||||
if (root.getScene() != null)
|
||||
updateTableHeight(root.getScene().getHeight());
|
||||
});
|
||||
|
||||
stakeInputTextField.textProperty().addListener(stakeListener);
|
||||
voteButton.setOnAction(e -> onVote());
|
||||
|
|
Loading…
Add table
Reference in a new issue