mirror of
https://github.com/h2zero/esp-nimble-cpp.git
synced 2024-11-22 13:10:55 +01:00
Prevent crash when characteristic vector is empty.
This commit is contained in:
parent
a1428e63a6
commit
58787b516b
1 changed files with 3 additions and 1 deletions
|
@ -256,7 +256,9 @@ bool NimBLERemoteService::retrieveCharacteristics(const NimBLEUUID *uuid_filter)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
m_characteristicVector.back()->m_endHandle = getEndHandle();
|
if (m_characteristicVector.size() > 0) {
|
||||||
|
m_characteristicVector.back()->m_endHandle = getEndHandle();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
NIMBLE_LOGD(LOG_TAG, "<< retrieveCharacteristics()");
|
NIMBLE_LOGD(LOG_TAG, "<< retrieveCharacteristics()");
|
||||||
|
|
Loading…
Reference in a new issue