Skip to content
This repository has been archived by the owner on Oct 4, 2024. It is now read-only.

Commit

Permalink
Fix possible crash on OS X
Browse files Browse the repository at this point in the history
  • Loading branch information
langerhans committed Jan 30, 2016
1 parent 7862a93 commit cac9696
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/main/java/org/multibit/MultiBit.java
Original file line number Diff line number Diff line change
Expand Up @@ -614,11 +614,13 @@ public void run() {
}

// Upgrade path from cryptsy
if (bitcoinController.getModel().getUserPreference(ExchangeModel.TICKER_FIRST_ROW_EXCHANGE).equals(ExchangeData.CRYPTS_EXCHANGE_NAME)) {
bitcoinController.getModel().setUserPreference(ExchangeModel.TICKER_FIRST_ROW_EXCHANGE, ExchangeData.POLONIEX_EXCHANGE_NAME);
}
if (bitcoinController.getModel().getUserPreference(ExchangeModel.TICKER_SECOND_ROW_EXCHANGE).equals(ExchangeData.CRYPTS_EXCHANGE_NAME)) {
bitcoinController.getModel().setUserPreference(ExchangeModel.TICKER_SECOND_ROW_EXCHANGE, ExchangeData.POLONIEX_EXCHANGE_NAME);
if (bitcoinController != null && bitcoinController.getModel() != null) { // Mac sometimes isn't ready yet...
if (ExchangeData.CRYPTS_EXCHANGE_NAME.equals(bitcoinController.getModel().getUserPreference(ExchangeModel.TICKER_FIRST_ROW_EXCHANGE))) {
bitcoinController.getModel().setUserPreference(ExchangeModel.TICKER_FIRST_ROW_EXCHANGE, ExchangeData.POLONIEX_EXCHANGE_NAME);
}
if (ExchangeData.CRYPTS_EXCHANGE_NAME.equals(bitcoinController.getModel().getUserPreference(ExchangeModel.TICKER_SECOND_ROW_EXCHANGE))) {
bitcoinController.getModel().setUserPreference(ExchangeModel.TICKER_SECOND_ROW_EXCHANGE, ExchangeData.POLONIEX_EXCHANGE_NAME);
}
}
} catch (Exception e) {
// An odd unrecoverable error occurred.
Expand Down

0 comments on commit cac9696

Please sign in to comment.