From 91a803d46394a668fd5cb51bd1b4dbea9b4b2fb0 Mon Sep 17 00:00:00 2001 From: Patrick Cheng Date: Fri, 30 Sep 2016 11:12:23 -0700 Subject: [PATCH] Reserve() is sometimes called when stackTop_ is null. The assert is invalid. --- include/rapidjson/internal/stack.h | 1 - 1 file changed, 1 deletion(-) diff --git a/include/rapidjson/internal/stack.h b/include/rapidjson/internal/stack.h index 54ac77a..26b716d 100644 --- a/include/rapidjson/internal/stack.h +++ b/include/rapidjson/internal/stack.h @@ -113,7 +113,6 @@ public: // Expansion is run very infrequently, so it is moved to another (probably non-inline) function. template 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(count);