diff --git a/src/Color.cc b/src/Color.cc index 27ffc08d..725d0d70 100644 --- a/src/Color.cc +++ b/src/Color.cc @@ -205,7 +205,8 @@ float& Color::operator[](const unsigned int _index) } std::cerr << "Trying to read index " << _index << " of Color" << std::endl; - throw std::runtime_error("Index Error: Color index out of range"); + static float invalidValue = NAN_F; + return invalidValue; } //////////////////////////////////////////////////