SyntaxFix
Write A Post
Hire A Developer
Questions
if (getActivity() == null) return;
works also in some cases. Just breaks the code execution from it and make sure the app not crash