mirror of
https://github.com/haveno-dex/haveno.git
synced 2025-12-15 07:52:58 -05:00
Add null checks
This commit is contained in:
parent
3c5da3007a
commit
b1a8cec3f8
3 changed files with 9 additions and 6 deletions
|
|
@ -194,8 +194,10 @@ public class PriceFeed {
|
|||
Futures.addCallback(future, new FutureCallback<MarketPrice>() {
|
||||
public void onSuccess(MarketPrice marketPrice) {
|
||||
UserThread.execute(() -> {
|
||||
cache.put(marketPrice.currencyCode, marketPrice);
|
||||
priceConsumer.accept(marketPrice.getPrice(type));
|
||||
if (marketPrice != null && priceConsumer != null) {
|
||||
cache.put(marketPrice.currencyCode, marketPrice);
|
||||
priceConsumer.accept(marketPrice.getPrice(type));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue