mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-05-03 09:20:26 -05:00
Fix crash when unloading layers; Fix issue accidentally unloading an asset too early
This commit is contained in:
committed by
Alexander Bock
parent
8070c307ce
commit
2cf268abf0
@@ -185,7 +185,6 @@ void LayerGroup::deleteLayer(const std::string& layerName) {
|
||||
std::string name = layerName;
|
||||
removePropertySubOwner(it->get());
|
||||
(*it)->deinitialize();
|
||||
_layers.erase(it);
|
||||
properties::PropertyOwner* layerGroup = it->get()->owner();
|
||||
properties::PropertyOwner* layerManager = layerGroup->owner();
|
||||
properties::PropertyOwner* globe = layerManager->owner();
|
||||
@@ -195,6 +194,7 @@ void LayerGroup::deleteLayer(const std::string& layerName) {
|
||||
layerGroup->identifier(),
|
||||
it->get()->identifier()
|
||||
);
|
||||
_layers.erase(it);
|
||||
update();
|
||||
if (_onChangeCallback) {
|
||||
_onChangeCallback(nullptr);
|
||||
|
||||
Reference in New Issue
Block a user