Fix use of invalidated iterator in the command map on exception
The command map can get mutated by command execution, so the iterators can get invalidated (now that we use our curstom HashMap implementation, all iterators are potentially invalidated by insert/removal)
This commit is contained in:
parent
c5824fc506
commit
3a3144f3f5
|
@ -456,7 +456,7 @@ void CommandManager::execute_single_command(CommandParameters params,
|
||||||
catch (runtime_error& error)
|
catch (runtime_error& error)
|
||||||
{
|
{
|
||||||
throw runtime_error(format("{}:{}: '{}' {}", pos.line+1, pos.column+1,
|
throw runtime_error(format("{}:{}: '{}' {}", pos.line+1, pos.column+1,
|
||||||
command_it->key, error.what()));
|
params[0], error.what()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user