mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-01-08 12:39:49 -06:00
add check if cdf file exist before reading
This commit is contained in:
@@ -62,6 +62,12 @@ namespace openspace{
|
||||
std::shared_ptr<ISWACygnet> cygnet;
|
||||
|
||||
if(extension == "cdf"){
|
||||
|
||||
if(!FileSys.fileExists(absPath(metadata->path))) {
|
||||
LERROR("Could not find cdf file: " << absPath(metadata->path));
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
std::shared_ptr<KameleonWrapper> kw = std::make_shared<KameleonWrapper>(absPath(metadata->path));
|
||||
|
||||
metadata->scale = kw->getModelScaleScaled();
|
||||
|
||||
Reference in New Issue
Block a user