catch NPE for binding (loadCurrentStatus#onError)

Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
This commit is contained in:
Marcel Hibbe 2022-07-11 13:44:24 +02:00
parent 2615da0121
commit 0dbe8c0f2c
No known key found for this signature in database
GPG key ID: C793F8B59F43CE7B

View file

@ -233,7 +233,11 @@ public class ChooseAccountDialogFragment extends DialogFragment {
@Override
public void onError(@NonNull Throwable e) {
Log.e(TAG, "Can't receive user status from server. ", e);
binding.statusView.setVisibility(View.GONE);
try {
binding.statusView.setVisibility(View.GONE);
} catch (NullPointerException npe) {
Log.i(TAG, "UI already teared down", npe);
}
}
@Override