forked from bblanchon/ArduinoJson
Fixed member-call-on-null-pointer in getMember() when array is empty
This commit is contained in:
@ -15,6 +15,7 @@ HEAD
|
|||||||
* Changed `JsonVariantConst::is<JsonArray/JsonObject>()` to return `false` (issue #1412)
|
* Changed `JsonVariantConst::is<JsonArray/JsonObject>()` to return `false` (issue #1412)
|
||||||
* Simplified `JsonVariant::as<T>()` to always return `T` (see below)
|
* Simplified `JsonVariant::as<T>()` to always return `T` (see below)
|
||||||
* Updated folders list in `.mbedignore` (PR #1515 by @AGlass0fMilk)
|
* Updated folders list in `.mbedignore` (PR #1515 by @AGlass0fMilk)
|
||||||
|
* Fixed member-call-on-null-pointer in `getMember()` when array is empty
|
||||||
|
|
||||||
> ### BREAKING CHANGES
|
> ### BREAKING CHANGES
|
||||||
>
|
>
|
||||||
|
@ -115,6 +115,8 @@ inline VariantSlot* CollectionData::getSlot(TAdaptedString key) const {
|
|||||||
}
|
}
|
||||||
|
|
||||||
inline VariantSlot* CollectionData::getSlot(size_t index) const {
|
inline VariantSlot* CollectionData::getSlot(size_t index) const {
|
||||||
|
if (!_head)
|
||||||
|
return 0;
|
||||||
return _head->next(index);
|
return _head->next(index);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user