Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Throw exception if model is empty #395

Merged
merged 3 commits into from
May 25, 2018
Merged

Conversation

karjonas
Copy link
Contributor

Empty models cause issues so throw an exception if they are added to the scene.

@karjonas karjonas requested a review from tribal-tec May 25, 2018 09:14
@@ -111,6 +111,9 @@ void Scene::clearLights()

size_t Scene::addModel(ModelDescriptorPtr model)
{
if (model->getModel().empty())
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The same applies for submodels, so please add this to Model::addModel() as well. I'm about to unify this somewhat duplication of code to add models, but for the time being it would be good to have those checks.

@karjonas karjonas merged commit 62b4a0a into BlueBrain:master May 25, 2018
@tribal-tec tribal-tec added the bug label May 30, 2018
@karjonas karjonas deleted the model_throw branch June 5, 2018 15:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants