1
0
mirror of https://github.com/moparisthebest/k-9 synced 2024-11-27 19:52:17 -05:00

Fixed potential NullPointerException

This commit is contained in:
cketti 2012-03-26 19:41:21 +02:00
parent 43cb78d2de
commit a1caebdcf1

View File

@ -2265,6 +2265,7 @@ public class MessagingController implements Runnable {
String newUid = remoteUidMap.get(remoteSrcUid); String newUid = remoteUidMap.get(remoteSrcUid);
Message localDestMessage = localDestFolder.getMessage(localDestUid); Message localDestMessage = localDestFolder.getMessage(localDestUid);
if (localDestMessage != null) {
localDestMessage.setUid(newUid); localDestMessage.setUid(newUid);
localDestFolder.changeUid((LocalMessage)localDestMessage); localDestFolder.changeUid((LocalMessage)localDestMessage);
for (MessagingListener l : getListeners()) { for (MessagingListener l : getListeners()) {
@ -2272,6 +2273,7 @@ public class MessagingController implements Runnable {
} }
} }
} }
}
} finally { } finally {
closeFolder(remoteSrcFolder); closeFolder(remoteSrcFolder);
closeFolder(remoteDestFolder); closeFolder(remoteDestFolder);