From 2b3bbb6948ddb8bac1bf99ec1e8e880669735e71 Mon Sep 17 00:00:00 2001 From: Marc Blank Date: Wed, 5 May 2010 20:48:09 -0700 Subject: [PATCH] Fix NPE in SyncManager Bug: 2660742 Change-Id: I80ec62a0e128b3f20873a718d951e41f3fa2eb90 --- src/com/android/exchange/SyncManager.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/com/android/exchange/SyncManager.java b/src/com/android/exchange/SyncManager.java index b451ef1f6..80594257b 100644 --- a/src/com/android/exchange/SyncManager.java +++ b/src/com/android/exchange/SyncManager.java @@ -830,8 +830,10 @@ public class SyncManager extends Service implements Runnable { static public String getEasAccountSelector() { SyncManager syncManager = INSTANCE; - if (syncManager == null) return null; - return syncManager.mAccountObserver.getAccountKeyWhere(); + if (syncManager != null && syncManager.mAccountObserver != null) { + return syncManager.mAccountObserver.getAccountKeyWhere(); + } + return null; } public class SyncStatus {