Skip to content
Snippets Groups Projects
Commit abfbf6fc authored by Ming Rui Zhang's avatar Ming Rui Zhang
Browse files

contactmodel: avoid invalid contact when searching existing sip contacts

Gitlab: #462
Change-Id: I8c4dcf6b50815d26e7ce89eccd87c6c2302215d2
parent 125de638
No related branches found
No related tags found
No related merge requests found
......@@ -479,10 +479,11 @@ ContactModelPimpl::searchSipContact(const URI& query)
return;
}
auto& temporaryContact = searchResult[query];
{
std::lock_guard<std::mutex> lk(contactsMtx_);
if (contacts.find(uriID) == contacts.end()) {
auto& temporaryContact = searchResult[query];
temporaryContact.profileInfo.uri = uriID;
temporaryContact.profileInfo.alias = uriID;
temporaryContact.profileInfo.type = profile::Type::TEMPORARY;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment