Merge "Fixing NPE when checking locked state."

This commit is contained in:
TreeHugger Robot
2016-12-19 20:02:15 +00:00
committed by Android (Google) Code Review

View File

@@ -138,7 +138,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) {