diff --git a/include/rapidjson/document.h b/include/rapidjson/document.h index 738677332..aab489c05 100644 --- a/include/rapidjson/document.h +++ b/include/rapidjson/document.h @@ -1741,7 +1741,7 @@ class GenericDocument : public GenericValue { template GenericDocument& ParseStream(InputStream& is) { ValueType::SetNull(); // Remove existing root if exist - GenericReader reader(&GetAllocator()); + GenericReader reader(&stack_.GetAllocator()); ClearStackOnExit scope(*this); parseResult_ = reader.template Parse(is, *this); if (parseResult_) {