Fix NPE in onStartCommand

Bug: 5041436
Change-Id: Ib7462e5c8cb040b7526d9a655c5ab3f41cd159b8
This commit is contained in:
Marc Blank 2011-07-18 09:49:52 -07:00
parent 21cbdd88e1
commit 90a4811551

View File

@ -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);