Prevent null pointer exception

This commit is contained in:
dtvv 2018-09-29 20:51:47 -05:00
parent e9a147e344
commit ad0c14e389

View file

@ -125,7 +125,9 @@ public class CryptoNetBalanceViewHolder extends RecyclerView.ViewHolder {
preferedCurrencySetting.observe((LifecycleOwner)this.itemView.getContext(), new Observer<GeneralSetting>() {
@Override
public void onChanged(@Nullable GeneralSetting generalSetting) {
preferredCurrency = generalSetting.getValue();
if(generalSetting != null){
preferredCurrency = generalSetting.getValue();
}
}
});