mirror of
https://github.com/eledio-devices/thirdparty-ArduinoJson.git
synced 2025-11-02 08:48:27 +01:00
Fix crash when adding an object member in a too small JsonDocument
This commit is contained in:
@@ -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