Skip to content

Conversation

@lucas-tulio
Copy link

At some point, the backStacks object can be null, making backStacks.peek() crash the app. I could not put my finger exactly on why this happens, but I suspect it's some kind of race condition. Anyway, it's always when trying to pop().

This PR does two things to address this problem:

  1. Adds a null check before trying to peek into our backStacks.
  2. Logs a warning every time we would try to pop or push with a null backStacks. That way we won't lose track of the problem.

This fixed the problem in our production app without any side effects but maybe somebody with more context on the code can clarify why this crash happens and whether this is an acceptable fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant