File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -1928,7 +1928,7 @@ RAPIDJSON_MULTILINEMACRO_END
1928
1928
const Context& CurrentContext () const { return *schemaStack_.template Top <Context>(); }
1929
1929
1930
1930
OutputHandler& CreateNullHandler () {
1931
- return *(nullHandler_ = static_cast <OutputHandler*> (GetStateAllocator ().Malloc (sizeof (OutputHandler))));
1931
+ return *(nullHandler_ = new (GetStateAllocator ().Malloc (sizeof (OutputHandler))) OutputHandler );
1932
1932
}
1933
1933
1934
1934
static const size_t kDefaultSchemaStackCapacity = 1024 ;
Original file line number Diff line number Diff line change @@ -1281,6 +1281,12 @@ TEST(SchemaValidatingWriter, Simple) {
1281
1281
EXPECT_TRUE (validator.GetInvalidDocumentPointer () == SchemaDocument::PointerType (" " ));
1282
1282
}
1283
1283
1284
+ TEST (Schema, Issue848) {
1285
+ rapidjson::Document d;
1286
+ rapidjson::SchemaDocument s (d);
1287
+ rapidjson::GenericSchemaValidator<rapidjson::SchemaDocument, rapidjson::Document> v (s);
1288
+ }
1289
+
1284
1290
#if RAPIDJSON_HAS_CXX11_RVALUE_REFS
1285
1291
1286
1292
static SchemaDocument ReturnSchemaDocument () {
You can’t perform that action at this time.
0 commit comments