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