File tree Expand file tree Collapse file tree 3 files changed +6
-4
lines changed Expand file tree Collapse file tree 3 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -55,6 +55,8 @@ inline void ArrayImpl::removeElement(size_t index) {
5555
5656template <typename T>
5757inline bool ArrayImpl::addValue (const T& value) {
58+ if (!data_)
59+ return false ;
5860 ARDUINOJSON_ASSERT (resources_ != nullptr );
5961 auto slot = resources_->allocVariant ();
6062 if (!slot)
Original file line number Diff line number Diff line change @@ -147,7 +147,7 @@ class JsonDeserializer {
147147
148148 template <typename TFilter>
149149 DeserializationError::Code parseArray (
150- ArrayImpl& array, TFilter filter,
150+ ArrayImpl array, TFilter filter,
151151 DeserializationOption::NestingLimit nestingLimit) {
152152 DeserializationError::Code err;
153153
@@ -233,7 +233,7 @@ class JsonDeserializer {
233233
234234 template <typename TFilter>
235235 DeserializationError::Code parseObject (
236- ObjectImpl& object, TFilter filter,
236+ ObjectImpl object, TFilter filter,
237237 DeserializationOption::NestingLimit nestingLimit) {
238238 DeserializationError::Code err;
239239
Original file line number Diff line number Diff line change @@ -336,8 +336,8 @@ class VariantData {
336336 }
337337
338338 template <typename TAdaptedString>
339- static VariantData* getMember (const VariantData* var, TAdaptedString key,
340- const ResourceManager* resources) {
339+ static VariantData* getMember (VariantData* var, TAdaptedString key,
340+ ResourceManager* resources) {
341341 if (!var)
342342 return 0 ;
343343 return var->getMember (key, resources);
You can’t perform that action at this time.
0 commit comments