Merge pull request #870 from StilesCrisis/null-handler-fix
Null handler fix
This commit is contained in:
commit
9cabd6372d
@ -1928,7 +1928,7 @@ private:
|
||||
const Context& CurrentContext() const { return *schemaStack_.template Top<Context>(); }
|
||||
|
||||
OutputHandler& CreateNullHandler() {
|
||||
return *(nullHandler_ = static_cast<OutputHandler*>(GetStateAllocator().Malloc(sizeof(OutputHandler))));
|
||||
return *(nullHandler_ = new (GetStateAllocator().Malloc(sizeof(OutputHandler))) OutputHandler);
|
||||
}
|
||||
|
||||
static const size_t kDefaultSchemaStackCapacity = 1024;
|
||||
|
@ -1281,6 +1281,12 @@ TEST(SchemaValidatingWriter, Simple) {
|
||||
EXPECT_TRUE(validator.GetInvalidDocumentPointer() == SchemaDocument::PointerType(""));
|
||||
}
|
||||
|
||||
TEST(Schema, Issue848) {
|
||||
rapidjson::Document d;
|
||||
rapidjson::SchemaDocument s(d);
|
||||
rapidjson::GenericSchemaValidator<rapidjson::SchemaDocument, rapidjson::Document> v(s);
|
||||
}
|
||||
|
||||
#if RAPIDJSON_HAS_CXX11_RVALUE_REFS
|
||||
|
||||
static SchemaDocument ReturnSchemaDocument() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user