SynchronizedDatabaseComponent.addLocalPrivateMessage() was not

checking whether the contact was still in the DB.
This commit is contained in:
akwizgran
2011-09-16 13:11:20 +01:00
parent f18c86b0d3
commit ad1ef4461f

View File

@@ -150,6 +150,7 @@ class SynchronizedDatabaseComponent<Txn> extends DatabaseComponentImpl<Txn> {
boolean added = false;
waitForPermissionToWrite();
synchronized(contactLock) {
if(!containsContact(c)) throw new NoSuchContactException();
synchronized(messageLock) {
synchronized(messageStatusLock) {
Txn txn = db.startTransaction();