From 3d494ecc67aed0d7313125aa0a2ddc1d440f8463 Mon Sep 17 00:00:00 2001 From: Manfred Karrer Date: Thu, 23 Oct 2014 18:36:58 +0200 Subject: [PATCH] Bugfix with missing null check when changing region combobox --- .../gui/main/account/content/fiat/FiatAccountViewCB.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/main/java/io/bitsquare/gui/main/account/content/fiat/FiatAccountViewCB.java b/src/main/java/io/bitsquare/gui/main/account/content/fiat/FiatAccountViewCB.java index 1b4760777b..6f15eb3b1c 100644 --- a/src/main/java/io/bitsquare/gui/main/account/content/fiat/FiatAccountViewCB.java +++ b/src/main/java/io/bitsquare/gui/main/account/content/fiat/FiatAccountViewCB.java @@ -164,12 +164,15 @@ public class FiatAccountViewCB extends CachedViewCB implements Co void onSelectRegion() { countryComboBox.setVisible(true); Region region = regionComboBox.getSelectionModel().getSelectedItem(); - countryComboBox.setItems(presentationModel.getAllCountriesFor(region)); + if (region != null) + countryComboBox.setItems(presentationModel.getAllCountriesFor(region)); } @FXML void onSelectCountry() { - presentationModel.setCountry(countryComboBox.getSelectionModel().getSelectedItem()); + Country country = countryComboBox.getSelectionModel().getSelectedItem(); + if (country != null) + presentationModel.setCountry(country); } @FXML