Skip to content
Snippets Groups Projects
Commit 4c3f8006 authored by Julien Malik's avatar Julien Malik
Browse files

TEST: avoid segfault in otbImageClassificationFilter

parent d47c751e
No related branches found
No related tags found
No related merge requests found
......@@ -59,6 +59,12 @@ int otbImageClassificationFilter(int itkNotUsed(argc), char * argv[])
model = MachineLearningModelFactoryType::CreateMachineLearningModel(modelfname,
MachineLearningModelFactoryType::ReadMode);
if (model.IsNull())
{
std::cerr << "Unable to create a model from " << modelfname << std::endl;
return EXIT_FAILURE;
}
model->Load(modelfname);
filter->SetModel(model);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment