From 862e0ddd042dfca626e4a2c345f2b23fbeed9dd8 Mon Sep 17 00:00:00 2001
From: Patrick Simpson
Date: Thu, 8 Jun 2017 09:31:01 +0200
Subject: [PATCH] [KOE-24] Added null check for folder id in stall detection
---
.../Features/SyncState/FeatureSyncState.cs | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/src/AcaciaZPushPlugin/AcaciaZPushPlugin/Features/SyncState/FeatureSyncState.cs b/src/AcaciaZPushPlugin/AcaciaZPushPlugin/Features/SyncState/FeatureSyncState.cs
index e889d57..ce7978e 100644
--- a/src/AcaciaZPushPlugin/AcaciaZPushPlugin/Features/SyncState/FeatureSyncState.cs
+++ b/src/AcaciaZPushPlugin/AcaciaZPushPlugin/Features/SyncState/FeatureSyncState.cs
@@ -500,9 +500,12 @@ namespace Acacia.Features.SyncState
// Check if the folder has synced. In that case, it's not stalled.
string folderId = (string)inbox.GetProperty(OutlookConstants.PR_ZPUSH_FOLDER_ID);
- SyncSession sync = account.GetFeatureData(this, null);
- if (sync.HasFolderSynced(folderId))
- return;
+ if (folderId != null)
+ {
+ SyncSession sync = account.GetFeatureData(this, null);
+ if (sync.HasFolderSynced(folderId))
+ return;
+ }
}
// It is not syncing, check for a stall