From 90a48115517c49a954eaa1b79b72a23b4486107a Mon Sep 17 00:00:00 2001 From: Marc Blank Date: Mon, 18 Jul 2011 09:49:52 -0700 Subject: [PATCH] Fix NPE in onStartCommand Bug: 5041436 Change-Id: Ib7462e5c8cb040b7526d9a655c5ab3f41cd159b8 --- src/com/android/email/service/AttachmentDownloadService.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/com/android/email/service/AttachmentDownloadService.java b/src/com/android/email/service/AttachmentDownloadService.java index a623da6ec..9fe072fd1 100644 --- a/src/com/android/email/service/AttachmentDownloadService.java +++ b/src/com/android/email/service/AttachmentDownloadService.java @@ -909,7 +909,7 @@ public class AttachmentDownloadService extends Service implements Runnable { if (sRunningService == null) { sRunningService = this; } - if (intent.hasExtra(EXTRA_ATTACHMENT)) { + if (intent != null && intent.hasExtra(EXTRA_ATTACHMENT)) { Attachment att = (Attachment)intent.getParcelableExtra(EXTRA_ATTACHMENT); Log.d(TAG, "*** ONSTARTCOMMAND, changed: " + att.mId); onChange(att);