Skip to content

Commit ff163d7

Browse files
author
Anders Goransson
committed
Chapter 10: Added missing null-check.
1 parent a9e244e commit ff163d7

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

EatApplication/Eat/src/main/java/com/eat/chapter10/FileDownloadActivity.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,9 @@ protected void onProgressUpdate(Bitmap... bitmaps) {
9999
@Override
100100
protected void onPostExecute(Void aVoid) {
101101
super.onPostExecute(aVoid);
102-
103-
mActivity.mProgressBar.setVisibility(View.GONE);
102+
if (mActivity != null) {
103+
mActivity.mProgressBar.setVisibility(View.GONE);
104+
}
104105
}
105106

106107
@Override

0 commit comments

Comments
 (0)