terrakok / Cicerone

🚦 Cicerone is a lightweight library that makes the navigation in an Android app easy.
Other
2.58k stars 218 forks source link

NPE if overriden errorWhileCreatingScreen method doesn't throw an exception #108

Closed zwieback closed 4 years ago

zwieback commented 4 years ago

If I will override errorWhileCreatingScreen method in the SupportFragmentNavigator's subclass so that this method will not throw an exception, then an NPE will be thrown at the FragmentTransaction.commit method in this place because this null check was deleted.

I suggest returning the null check after creating the fragment.

terrakok commented 4 years ago

Good point! #111

zwieback commented 4 years ago

Thanks, @terrakok. You rock!