commit | 54dfec1339871e1a9c9e454ed61f2301dde66116 | [log] [tgz] |
---|---|---|
author | Edwin Kempin <ekempin@google.com> | Tue Nov 29 16:53:59 2016 +0100 |
committer | Edwin Kempin <ekempin@google.com> | Tue Nov 29 16:53:59 2016 +0100 |
tree | fb3b029aa9a7552dcb1d16c88d627975aa4f57ec | |
parent | 2711bf867e89803c240e3075cebb8c9783714fe0 [diff] |
AvatarTask: Fix NPE, handle null bitmap Change-Id: I209efa059c98e74a634bd309ce63f62969e11bec Signed-off-by: Edwin Kempin <ekempin@google.com>
diff --git a/app/src/main/java/com/google/reviewit/AvatarTask.java b/app/src/main/java/com/google/reviewit/AvatarTask.java index f47d305..601dab1 100644 --- a/app/src/main/java/com/google/reviewit/AvatarTask.java +++ b/app/src/main/java/com/google/reviewit/AvatarTask.java
@@ -85,7 +85,7 @@ } } Bitmap bitmap = BitmapFactory.decodeByteArray(bytes, 0, bytes.length); - return getRoundedCornerBitmap(bitmap, 10); + return bitmap != null ? getRoundedCornerBitmap(bitmap, 10) : null; } protected void postExecute(Bitmap result) {