mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-01-04 10:40:09 -06:00
Prevent crash when removing a globebrowsing layer
This commit is contained in:
Submodule apps/OpenSpace/ext/sgct updated: 1dd1160fbf...f90ab136ef
@@ -153,6 +153,9 @@ void LayerGroup::deleteLayer(const std::string& layerName) {
|
||||
++it)
|
||||
{
|
||||
if (it->get()->identifier() == layerName) {
|
||||
// we need to make a copy as the layername is only a reference
|
||||
// which will no longer be valid once it is deleted
|
||||
std::string name = layerName;
|
||||
removePropertySubOwner(it->get());
|
||||
(*it)->deinitialize();
|
||||
_layers.erase(it);
|
||||
@@ -160,7 +163,7 @@ void LayerGroup::deleteLayer(const std::string& layerName) {
|
||||
if (_onChangeCallback) {
|
||||
_onChangeCallback(nullptr);
|
||||
}
|
||||
LINFO("Deleted layer " + layerName);
|
||||
LINFO("Deleted layer " + name);
|
||||
|
||||
if (_layers.empty()) {
|
||||
_levelBlendingEnabled.setVisibility(
|
||||
|
||||
@@ -459,6 +459,9 @@ std::string consumeTemporalMetaData(TemporalTileProvider& t, const std::string&
|
||||
}
|
||||
else {
|
||||
gdalNode = CPLSearchXMLNode(node, "FilePath");
|
||||
if (gdalNode) {
|
||||
return "";
|
||||
}
|
||||
std::string gdalDescription = std::string(gdalNode->psChild->pszValue);
|
||||
return gdalDescription;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user