mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-02-21 12:29:04 -06:00
Don't crash if TileProvider cannot be created (closes #464)
This commit is contained in:
@@ -74,7 +74,13 @@ Layer* LayerManager::addLayer(layergroupid::GroupID groupId,
|
||||
const ghoul::Dictionary& layerDict)
|
||||
{
|
||||
ghoul_assert(groupId != layergroupid::Unknown, "Layer group ID must be known");
|
||||
return _layerGroups[groupId]->addLayer(layerDict);
|
||||
try {
|
||||
return _layerGroups[groupId]->addLayer(layerDict);
|
||||
}
|
||||
catch (const ghoul::RuntimeError& e) {
|
||||
LERRORC(e.component, e.message);
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
void LayerManager::deleteLayer(layergroupid::GroupID id, const std::string& layerName) {
|
||||
|
||||
Reference in New Issue
Block a user