diff --git a/components/net/sf/briar/db/DatabaseComponentImpl.java b/components/net/sf/briar/db/DatabaseComponentImpl.java
index 03f2f8a74b9c01bdcf1be9595559c7c60e2b8a78..34f177ec8b7c5c90bd2fe6a65872e5968c9c9a26 100644
--- a/components/net/sf/briar/db/DatabaseComponentImpl.java
+++ b/components/net/sf/briar/db/DatabaseComponentImpl.java
@@ -1204,6 +1204,7 @@ DatabaseCleaner.Callback {
 
 	public void receiveTransportUpdate(ContactId c, TransportUpdate t)
 	throws DbException {
+		Collection<Transport> transports;
 		// Update the contact's transport properties
 		contactLock.readLock().lock();
 		try {
@@ -1212,7 +1213,7 @@ DatabaseCleaner.Callback {
 			try {
 				T txn = db.startTransaction();
 				try {
-					Collection<Transport> transports = t.getTransports();
+					transports = t.getTransports();
 					db.setTransports(txn, c, transports, t.getTimestamp());
 					db.commitTransaction(txn);
 				} catch(DbException e) {
@@ -1226,7 +1227,7 @@ DatabaseCleaner.Callback {
 			contactLock.readLock().unlock();
 		}
 		// Call the listeners outside the lock
-		callListeners(new RemoteTransportsUpdatedEvent(c, t.getTransports()));
+		callListeners(new RemoteTransportsUpdatedEvent(c, transports));
 	}
 
 	public void removeContact(ContactId c) throws DbException {