diff --git a/cpp/utils.cc b/cpp/utils.cc index d9c98d0..1159db2 100644 --- a/cpp/utils.cc +++ b/cpp/utils.cc @@ -103,6 +103,9 @@ namespace f8 if (field_desc->is_repeated()) { std::shared_ptr repeated_field = jsonobj.At(field_name); + if (!repeated_field) { + continue; + } for (int i = 0; i < repeated_field->Size(); ++i) { auto field_value = repeated_field->At(i); switch (field_desc->cpp_type()) {