From 98f1d402cba91a1983dac2eb00de731657e133a5 Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Thu, 30 Jul 2020 15:51:13 +0800 Subject: [PATCH] 1 --- cpp/utils.cc | 3 +++ 1 file changed, 3 insertions(+) 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()) {