Commit c663d391 authored by PACANOWSKI Romain's avatar PACANOWSKI Romain

Checking the output of the method load() from the BRDF or function to return...

Checking the output of the method load() from the BRDF or function to return the appropriate value if the function was not correctly loaded
parent 00774d7e
......@@ -227,9 +227,13 @@ function* plugins_manager::get_function(const std::string& filename)
f->setParametrization(param_out);
// Load the function part from the file object
f->load(file);
if( f->load(file) )
{
return f;
}
return f;
std::cout << "<<ERROR>> COULD NOT LOAD THE BRDF from File " << filename << std::endl;
return NULL;
}
//! Get an instance of the function selected based on the name <em>n</em>.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment