Skip to content

Commit

Permalink
Add a null check for domain when erasing the contents of services
Browse files Browse the repository at this point in the history
  • Loading branch information
nivi-apple committed Mar 30, 2024
1 parent 5b9b5e9 commit 072d568
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/platform/Darwin/DnssdContexts.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,7 @@ void BrowseContext::OnBrowseRemove(const char * name, const char * type, const c
[name, type, interfaceId, domain](const auto & service) {
return strcmp(name, service.first.mName) == 0 && type == GetFullType(&service.first) &&
service.first.mInterface == chip::Inet::InterfaceId(interfaceId) &&
strcmp(domain, service.second.c_str()) == 0;
domain != nullptr && strcmp(domain, service.second.c_str()) == 0;
}),
services.end());
}
Expand Down

0 comments on commit 072d568

Please sign in to comment.