Commit bf0cc7be authored by Milo Yip's avatar Milo Yip

Fixed a bug for SchemaDocument move constructor

parent 7c4e511e
......@@ -1339,6 +1339,7 @@ public:
allocator_(allocator),
ownAllocator_(),
root_(),
typeless_(),
schemaMap_(allocator, kInitialSchemaMapSize),
schemaRef_(allocator, kInitialSchemaRefSize)
{
......@@ -1398,8 +1399,10 @@ public:
while (!schemaMap_.Empty())
schemaMap_.template Pop<SchemaEntry>(1)->~SchemaEntry();
typeless_->~SchemaType();
Allocator::Free(typeless_);
if (typeless_) {
typeless_->~SchemaType();
Allocator::Free(typeless_);
}
RAPIDJSON_DELETE(ownAllocator_);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment