Skip to content

Commit

Permalink
Avoid nullptr access in MinimalScene
Browse files Browse the repository at this point in the history
Signed-off-by: Louise Poubel <[email protected]>
  • Loading branch information
chapulina committed Mar 30, 2022
1 parent ec910ed commit 5fcff84
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/plugins/minimal_scene/MinimalScene.cc
Original file line number Diff line number Diff line change
Expand Up @@ -559,6 +559,11 @@ std::string IgnRenderer::Initialize()

igndbg << "Create scene [" << this->sceneName << "]" << std::endl;
auto scene = engine->CreateScene(this->sceneName);
if (nullptr == scene)
{
return "Failed to create scene [" + this->sceneName + "] for engine [" +
this->engineName + "]";
}
scene->SetAmbientLight(this->ambientLight);
scene->SetBackgroundColor(this->backgroundColor);

Expand Down

0 comments on commit 5fcff84

Please sign in to comment.