Work around a weird NPE in WebDAV sync reported by Jon Blow

This commit is contained in:
Jesse Vincent 2011-07-19 22:43:32 -04:00
parent 5dc1409a10
commit 0543183b11
1 changed files with 5 additions and 1 deletions

View File

@ -1590,7 +1590,11 @@ public class WebDavStore extends Store {
listener.messageStarted(wdMessage.getUid(), i, count);
}
wdMessage.setFlagInternal(Flag.SEEN, uidToReadStatus.get(wdMessage.getUid()));
try {
wdMessage.setFlagInternal(Flag.SEEN, uidToReadStatus.get(wdMessage.getUid()));
} catch (NullPointerException e) {
Log.v(K9.LOG_TAG,"Under some weird circumstances, setting the read status when syncing from webdav threw an NPE. Skipping.");
}
if (listener != null) {
listener.messageFinished(wdMessage, i, count);