diff --git a/include/rapidjson/document.h b/include/rapidjson/document.h index a41288e..7872460 100644 --- a/include/rapidjson/document.h +++ b/include/rapidjson/document.h @@ -719,7 +719,7 @@ public: template GenericDocument& ParseStream(InputStream& is) { ValueType::SetNull(); // Remove existing root if exist - GenericReader reader; + GenericReader reader(&GetAllocator()); if (reader.template Parse(is, *this)) { RAPIDJSON_ASSERT(stack_.GetSize() == sizeof(ValueType)); // Got one and only one root object this->RawAssign(*stack_.template Pop(1)); // Add this-> to prevent issue 13.