From 484e137691a0fb33511a5815304ac3a5c0c8238b Mon Sep 17 00:00:00 2001 From: Marc Blank Date: Fri, 25 Sep 2009 10:15:46 -0700 Subject: [PATCH] Add check in SyncManager before stopping thread (fixes #2131380) Change-Id: I0f0dcc9721094ed29fd241b8a71e30ee0717cdfb --- src/com/android/exchange/SyncManager.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/com/android/exchange/SyncManager.java b/src/com/android/exchange/SyncManager.java index b038ece3c..8b51834e6 100644 --- a/src/com/android/exchange/SyncManager.java +++ b/src/com/android/exchange/SyncManager.java @@ -564,7 +564,10 @@ public class SyncManager extends Service implements Runnable { AbstractSyncService svc = INSTANCE.mServiceMap.get(mid); if (svc != null) { svc.stop(); - svc.mThread.interrupt(); + Thread t = svc.mThread; + if (t != null) { + t.interrupt(); + } } deletedBoxes.add(mid); }