City-of-Bloomington/open311-android — pull request #61 by Araz-Abishov (2013-04-18 05:43:42+00:00)
Title: BugFix - App crash after exiting Saved Report

I've found out that problem lies in RefreshFromServerTask. As you open Saved Report, new RefreshFromServerTask launches in background (as AsyncTask) and tries to get data from server. But if you have slow connection this process may take a long time. And if you exit Saved Report before RefreshFromServerTask finishes, application crashes with NullPointerException. This happens because RefreshFromServerTask in onPostExecute block calls refreshViewData(). It is okay if user still in Saved Report, but if not, refreshViewData() tries to refresh Views in Saved Report which now don't exist.
The best way to handle this error is to catch NullPointerException in onPostExecute.