Skip to content
Snippets Groups Projects
Commit 2c03fdf9 authored by Harald Scheirich's avatar Harald Scheirich
Browse files

BUG: use a direct check for light existance

parent cfdbe9e3
No related branches found
No related tags found
No related merge requests found
......@@ -357,7 +357,7 @@ Scene::getLight(const std::string& lightName) const
void
Scene::addLight(const std::string& name, std::shared_ptr<Light> newLight)
{
if (this->getLight(name) != nullptr)
if (m_lightsMap.find(name) != m_lightsMap.cend())
{
LOG(WARNING) << "Can not add light: '" << name
<< "' is already registered in this scene.";
......
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