Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e2c855e7 authored by Myles Watson's avatar Myles Watson
Browse files

LeAclManagerFacade: Check per_connection_events

Avoid a segmentation fault if there was no previously connected device.

Bug: 230123996
Test: cert/run
Tag: #gd-refactor
Change-Id: Ibcc4469498d2e17e49a51d4e9b59ba38919244a2
parent b3106508
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -275,6 +275,8 @@ class LeAclManagerFacadeService : public LeAclManagerFacade::Service, public LeC
      direct_connection_address_ = AddressWithType();
      per_connection_events_.emplace(peer, direct_connection_events_);
      direct_connection_events_.reset();
    } else {
      ASSERT_LOG(per_connection_events_.count(peer) > 0, "No connection request for %s", peer.ToString().c_str());
    }
    acl_connections_.emplace(
        std::piecewise_construct,