Protect empty header value types in ZmqReceiver

This commit is contained in:
2020-04-15 11:55:49 +02:00
parent 188fc93dd9
commit 4b6b80afc9
+6 -4
View File
@@ -194,10 +194,12 @@ shared_ptr<FrameMetadata> ZmqReceiver::read_json_header(const string& header)
cout << " Header string: " << header << endl;
cout << "Expected JSON header format: " << endl;
for (const auto& value_mapping : header_values_type_) {
cout << "\t" << value_mapping.first << ":";
cout << value_mapping.second.type;
cout << "[" << value_mapping.second.value_shape << "]" << endl;
if (!header_values_type_.empty()) {
for (const auto &value_mapping : header_values_type_) {
cout << "\t" << value_mapping.first << ":";
cout << value_mapping.second.type;
cout << "[" << value_mapping.second.value_shape << "]" << endl;
}
}
throw;