forked from bblanchon/ArduinoJson
Fix crash when adding an object member in a too small JsonDocument
This commit is contained in:
1 parent
4b4c68df5f
commit
ee12155617
3 files changed
+13
No files matched your search
@@ -26,6 +26,8 @@ struct SlotKeySetter {
|
||||
template <typename TAdaptedString, typename TStoragePolicy>
|
||||
inline bool slotSetKey(VariantSlot* var, TAdaptedString key, MemoryPool* pool,
|
||||
TStoragePolicy storage) {
|
||||
if (!var)
|
||||
return false;
|
||||
return storage.store(key, pool, SlotKeySetter(var));
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user