Fix null handler construction
We should not malloc the null-handler object and cast to OutputHandler; we need to actually invoke the constructor via placement new.
This commit is contained in:
parent
0ec4e86f14
commit
4643104b8a
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user