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,8 +256,10 @@ bool NimBLERemoteService::retrieveCharacteristics(const NimBLEUUID *uuid_filter)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (m_characteristicVector.size() > 0) {
|
||||||
m_characteristicVector.back()->m_endHandle = getEndHandle();
|
m_characteristicVector.back()->m_endHandle = getEndHandle();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
NIMBLE_LOGD(LOG_TAG, "<< retrieveCharacteristics()");
|
NIMBLE_LOGD(LOG_TAG, "<< retrieveCharacteristics()");
|
||||||
return true;
|
return true;
|
||||||
|
|
Loading…
Reference in a new issue