Prevent null pointer exception
This commit is contained in:
parent
e9a147e344
commit
ad0c14e389
1 changed files with 3 additions and 1 deletions
|
@ -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();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in a new issue