From f470112cae72b094cae13640f6f257c357e30d83 Mon Sep 17 00:00:00 2001 From: woodser Date: Tue, 29 Oct 2024 08:33:36 -0400 Subject: [PATCH] fix FX application thread error in portfolio view #1356 --- .../java/haveno/desktop/main/portfolio/PortfolioView.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/desktop/src/main/java/haveno/desktop/main/portfolio/PortfolioView.java b/desktop/src/main/java/haveno/desktop/main/portfolio/PortfolioView.java index db5759a2..3b17109a 100644 --- a/desktop/src/main/java/haveno/desktop/main/portfolio/PortfolioView.java +++ b/desktop/src/main/java/haveno/desktop/main/portfolio/PortfolioView.java @@ -140,8 +140,10 @@ public class PortfolioView extends ActivatableView { @Override protected void activate() { failedTradesManager.getObservableList().addListener((ListChangeListener) c -> { - if (failedTradesManager.getObservableList().size() > 0 && root.getTabs().size() == 3) - root.getTabs().add(failedTradesTab); + UserThread.execute(() -> { + if (failedTradesManager.getObservableList().size() > 0 && root.getTabs().size() == 3) + root.getTabs().add(failedTradesTab); + }); }); if (failedTradesManager.getObservableList().size() > 0 && root.getTabs().size() == 3) root.getTabs().add(failedTradesTab);