mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-05-08 04:20:14 -05: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;
|
std::shared_ptr<ISWACygnet> cygnet;
|
||||||
|
|
||||||
if(extension == "cdf"){
|
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));
|
std::shared_ptr<KameleonWrapper> kw = std::make_shared<KameleonWrapper>(absPath(metadata->path));
|
||||||
|
|
||||||
metadata->scale = kw->getModelScaleScaled();
|
metadata->scale = kw->getModelScaleScaled();
|
||||||
|
|||||||
Reference in New Issue
Block a user