Prevent crash

This commit is contained in:
M66B 2021-10-15 07:41:08 +02:00
parent 9d21d210ed
commit 290cf15eff
1 changed files with 3 additions and 0 deletions

View File

@ -725,6 +725,9 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
if (pos == NO_POSITION)
return null;
if (!getLifecycle().getCurrentState().isAtLeast(Lifecycle.State.STARTED))
return null;
TupleMessageEx prev = adapter.getItemAtPosition(pos - 1);
TupleMessageEx message = adapter.getItemAtPosition(pos);
if (pos > 0 && prev == null)