Skip to content
Snippets Groups Projects
Commit cca5aca0 authored by Andre Sailer's avatar Andre Sailer
Browse files

DDRec: LayeringExtension prevent use of invalid iterator

parent 95458222
No related branches found
No related tags found
No related merge requests found
......@@ -171,7 +171,9 @@ void LayeringExtensionImpl::checkMap(int layerIndex) const {
map<int, LayerAttributes>::iterator it;
it = _layerMap.find(layerIndex);
if (it == _layerMap.end()) {
// TODO throw exception
std::stringstream err;
err << "No entry found for layer" << layerIndex;
throw std::out_of_range(err.str());
}
if (not it->second.isCalculated) {
it->second.calculate();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment