Fixed crashes caused by the preceding commit.

This commit is contained in:
bubnikv 2018-10-01 11:07:31 +02:00
parent b338eb0ce0
commit 986103be1d

View File

@ -2245,8 +2245,7 @@ std::string DynamicPrintConfig::validate()
size_t DynamicPrintConfig::remove_keys_not_in(const DynamicPrintConfig &default_config, std::string &removed_keys_message)
{
size_t n_removed_keys = 0;
for (const auto &kvp : this->options) {
const std::string &key = kvp.first;
for (const std::string &key : this->keys()) {
if (! default_config.has(key)) {
if (removed_keys_message.empty())
removed_keys_message = key;