add check if cdf file exist before reading

This commit is contained in:
Michael Nilsson
2016-04-06 15:34:50 -04:00
parent bea3a1b89b
commit 5e8df2fd06

View File

@@ -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();