Fix the usage of the stack::GetAllocator

This commit is contained in:
Rodion Malinovsky 2015-09-16 14:54:38 +03:00
parent c7433dfc5e
commit 2e11498943

View File

@ -1887,7 +1887,8 @@ public:
template <unsigned parseFlags, typename SourceEncoding, typename InputStream>
GenericDocument& ParseStream(InputStream& is) {
ValueType::SetNull(); // Remove existing root if exist
GenericReader<SourceEncoding, Encoding, StackAllocator> reader(&stack_.GetAllocator());
GenericReader<SourceEncoding, Encoding, StackAllocator> reader(
stack_.HasAllocator() ? &stack_.GetAllocator() : 0);
ClearStackOnExit scope(*this);
parseResult_ = reader.template Parse<parseFlags>(is, *this);
if (parseResult_) {