mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-22 07:39:53 +01:00
Check whether contact group exists before using it.
This commit is contained in:
@@ -96,6 +96,9 @@ class ClientVersioningManagerImpl implements ClientVersioningManager, Client,
|
|||||||
try {
|
try {
|
||||||
Contact contact = db.getContact(txn, contactId);
|
Contact contact = db.getContact(txn, contactId);
|
||||||
Group g = getContactGroup(contact);
|
Group g = getContactGroup(contact);
|
||||||
|
// Contact may be in the process of being added or removed, so
|
||||||
|
// contact group may not exist
|
||||||
|
if (!db.containsGroup(txn, g.getId())) return INVISIBLE;
|
||||||
LatestUpdates latest = findLatestUpdates(txn, g.getId());
|
LatestUpdates latest = findLatestUpdates(txn, g.getId());
|
||||||
if (latest.local == null) throw new DbException();
|
if (latest.local == null) throw new DbException();
|
||||||
if (latest.remote == null) return INVISIBLE;
|
if (latest.remote == null) return INVISIBLE;
|
||||||
|
|||||||
Reference in New Issue
Block a user