Fixing NPE when checking locked state.

- Regression from change 9f4ab32b1c.

Change-Id: I31ada9f4c051cf0aaa9a7bfa54c1b9bda1c64c16
Fixes: b/33738356
Test: Dock an app repeatedly
This commit is contained in:
Winson Chung
2016-12-19 10:31:07 -08:00
parent df2b94fa55
commit b6b9950d13

View File

@@ -136,7 +136,7 @@ public class TaskViewThumbnail extends View {
int thumbnailHeight = Math.min(viewHeight,
(int) (mThumbnailRect.height() * mThumbnailScale));
if (mTask.isLocked) {
if (mTask != null && mTask.isLocked) {
canvas.drawRoundRect(0, 0, viewWidth, viewHeight, mCornerRadius, mCornerRadius,
mLockedPaint);
} else if (mBitmapShader != null && thumbnailWidth > 0 && thumbnailHeight > 0) {