Skip to content

Commit

Permalink
Fix scenario where entering garbage input breaks the app
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris Tarazi committed Jan 25, 2016
1 parent 253be0a commit 437804c
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -538,6 +538,10 @@ protected void onPostExecute(Restaurant restaurant) {
if (restaurant == null) {
Toast.makeText(getActivity(), "Error during transmission. Either no restaurants were " +
"found in your area or an internet communication error occurred. Try again.", Toast.LENGTH_SHORT).show();

// Signal the task has finished (failed task is still a finished task)
taskRunning = false;

return;
}

Expand Down

0 comments on commit 437804c

Please sign in to comment.