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

Commit 0942ee49 authored by Greg Kaiser's avatar Greg Kaiser
Browse files

gatt: Avoid using erased iterator

After we've called erase() on an iterator, we can't safely use
it anymore.  We avoid this, to assure consistent behavior from
this code.

Test: None
Change-Id: I4c9aecadc768d57f942669b7e68ee3a302e67e9c
parent 81a66138
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -111,7 +111,7 @@ bool DatabaseBuilder::StartNextServiceExploration() {
    services_to_discover.erase(handle_range);

    // Empty service declaration, nothing to explore, skip to next.
    if (handle_range->first == handle_range->second) continue;
    if (pending_service.first == pending_service.second) continue;

    pending_characteristic = HANDLE_MIN;
    return true;