diff --git a/src/problem.cpp b/src/problem.cpp index 9305ae083559f90c991ca0436778030b543ebe88..c0d94c036a71161154df87b0cb770f173ca2e754 100644 --- a/src/problem.cpp +++ b/src/problem.cpp @@ -91,6 +91,13 @@ ProcessorBasePtr Problem::installProcessor(const std::string& _prc_type, // SensorBasePtr _corresponding_sensor_ptr, // ProcessorParamsBasePtr _prc_params) { + if (_corresponding_sensor_ptr == nullptr) + { + WOLF_ERROR("Cannot install processor '", _unique_processor_name, + "' since the associated sensor does not exist !"); + return ProcessorBasePtr(); + } + ProcessorBasePtr prc_ptr = ProcessorFactory::get().create(uppercase(_prc_type), _unique_processor_name, _prc_params, _corresponding_sensor_ptr); _corresponding_sensor_ptr->addProcessor(prc_ptr);