diff --git a/src/ServerPrivate.cc b/src/ServerPrivate.cc index 65d7915bcf..d80d8443bb 100644 --- a/src/ServerPrivate.cc +++ b/src/ServerPrivate.cc @@ -248,7 +248,6 @@ void ServerPrivate::AddRecordPlugin(const ServerConfig &_config) recordPluginElem->Get("compress_path", ""); std::tie(sdfRecordResources, hasRecordResources) = recordPluginElem->Get("record_resources", false); - hasRecordTopics = recordPluginElem->HasElement("record_topic"); if (hasRecordTopics) { @@ -258,9 +257,8 @@ void ServerPrivate::AddRecordPlugin(const ServerConfig &_config) { auto topic = recordTopicElem->Get(); sdfRecordTopics.push_back(topic); + recordTopicElem = recordTopicElem->GetNextElement(); } - - recordTopicElem = recordTopicElem->GetNextElement(); } // Remove from SDF