Skip to content

Commit

Permalink
Add check for object in metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
langmm committed Sep 21, 2023
1 parent 984132c commit 95904c6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion communication/utils/serialization.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -765,7 +765,8 @@ void Metadata::Display(const char* indent) const {
std::cout << document2string(metadata, indent) << std::endl;
}
void Metadata::_update_schema() {
if (metadata.HasMember("serializer") &&
if (metadata.IsObject() &&
metadata.HasMember("serializer") &&
metadata["serializer"].IsObject() &&
metadata["serializer"].HasMember("datatype") &&
metadata["serializer"]["datatype"].IsObject()) {
Expand Down

0 comments on commit 95904c6

Please sign in to comment.