summaryrefslogtreecommitdiffstatshomepage
path: root/src/lib/util/options.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/util/options.cpp')
-rw-r--r--src/lib/util/options.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/lib/util/options.cpp b/src/lib/util/options.cpp
index f1229359d16..0e02b7dc735 100644
--- a/src/lib/util/options.cpp
+++ b/src/lib/util/options.cpp
@@ -702,7 +702,10 @@ void core_options::remove_entry(core_options::entry &delentry)
// remove all names from the map
for (int name = 0; name < ARRAY_LENGTH(delentry.m_name); name++)
if (!delentry.m_name[name].empty())
- m_entrymap.erase(m_entrymap.find(delentry.m_name[name]));
+ {
+ auto entry = m_entrymap.find(delentry.m_name[name]);
+ if (entry!= m_entrymap.end()) m_entrymap.erase(entry);
+ }
// remove the entry from the list
m_entrylist.remove(delentry);