Skip to content
Snippets Groups Projects
Verified Commit cf396c2c authored by akwizgran's avatar akwizgran
Browse files

Check whether contact group exists before using it.

parent a9f77f0f
No related branches found
No related tags found
No related merge requests found
......@@ -96,6 +96,9 @@ class ClientVersioningManagerImpl implements ClientVersioningManager, Client,
try {
Contact contact = db.getContact(txn, contactId);
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());
if (latest.local == null) throw new DbException();
if (latest.remote == null) return INVISIBLE;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment