Fixed null root_table access in binary schema generation.

Change-Id: Ia2b7abc10bee52814e815befcad6a89697295d8f
Tested: on Linux.
This commit is contained in:
Wouter van Oortmerssen 2015-06-29 15:21:48 -07:00
parent cb2b2be54e
commit 36c7e9a962
1 changed files with 3 additions and 1 deletions

View File

@ -1338,7 +1338,9 @@ void Parser::Serialize() {
builder_.CreateVectorOfSortedTables(&enum_offsets), builder_.CreateVectorOfSortedTables(&enum_offsets),
builder_.CreateString(file_identifier_), builder_.CreateString(file_identifier_),
builder_.CreateString(file_extension_), builder_.CreateString(file_extension_),
root_struct_def_->serialized_location); root_struct_def_
? root_struct_def_->serialized_location
: 0);
builder_.Finish(schema_offset, reflection::SchemaIdentifier()); builder_.Finish(schema_offset, reflection::SchemaIdentifier());
} }