mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-05-12 22:39:09 -05:00
Don't crash when trying to add assets with invalid path (closes #2299)
This commit is contained in:
@@ -190,7 +190,14 @@ void AssetManager::update() {
|
||||
ZoneScopedN("Adding queued assets")
|
||||
|
||||
std::filesystem::path path = generateAssetPath(_assetRootDirectory, asset);
|
||||
Asset* a = retrieveAsset(path, "");
|
||||
Asset* a = nullptr;
|
||||
try {
|
||||
a = retrieveAsset(path, "");
|
||||
}
|
||||
catch (const ghoul::RuntimeError& e) {
|
||||
LERRORC(e.component, e.message);
|
||||
continue;
|
||||
}
|
||||
|
||||
const auto it = std::find(_rootAssets.cbegin(), _rootAssets.cend(), a);
|
||||
if (it != _rootAssets.cend()) {
|
||||
|
||||
Reference in New Issue
Block a user