Added small fix for retrieval of non-Exchange deleted tasks
This commit is contained in:
parent
14def3a3a2
commit
1bca1fab38
@ -241,7 +241,14 @@ namespace Outlook2013TodoAddIn
|
||||
List<OLTaskItem> tasks = new List<OLTaskItem>();
|
||||
foreach (object item in todoFolder.Items)
|
||||
{
|
||||
tasks.Add(new OLTaskItem(item));
|
||||
try
|
||||
{
|
||||
tasks.Add(new OLTaskItem(item));
|
||||
}
|
||||
catch
|
||||
{
|
||||
// Do nothing, probably the task had already been deleted
|
||||
}
|
||||
}
|
||||
return tasks.Where(t => t.ValidTaskItem).ToList(); // Filter out invalid ones
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user