Reserve() is sometimes called when stackTop_ is null. The assert is invalid.

This commit is contained in:
Patrick Cheng 2016-09-30 11:12:23 -07:00
parent 9d8df28c1d
commit 91a803d463

View File

@ -113,7 +113,6 @@ public:
// Expansion is run very infrequently, so it is moved to another (probably non-inline) function.
template<typename T>
RAPIDJSON_FORCEINLINE void Reserve(size_t count = 1) {
RAPIDJSON_ASSERT(stackTop_);
// Expand the stack if needed
if (RAPIDJSON_UNLIKELY(stackTop_ + sizeof(T) * count > stackEnd_))
Expand<T>(count);