Skip to content
Snippets Groups Projects
Commit 4c4f3928 authored by Joan Vallvé Navarro's avatar Joan Vallvé Navarro
Browse files

check non-null sensor in getCaptureOf(sensor)

parent 0b1e1db9
No related branches found
No related tags found
No related merge requests found
...@@ -274,9 +274,10 @@ CaptureBasePtr FrameBase::getCaptureOf(const SensorBasePtr _sensor_ptr, const st ...@@ -274,9 +274,10 @@ CaptureBasePtr FrameBase::getCaptureOf(const SensorBasePtr _sensor_ptr, const st
CaptureBasePtr FrameBase::getCaptureOf(const SensorBaseConstPtr _sensor_ptr) const CaptureBasePtr FrameBase::getCaptureOf(const SensorBaseConstPtr _sensor_ptr) const
{ {
for (CaptureBasePtr capture_ptr : getCaptureList()) if (_sensor_ptr)
if (capture_ptr->getSensor() == _sensor_ptr) for (CaptureBasePtr capture_ptr : getCaptureList())
return capture_ptr; if (capture_ptr->getSensor() == _sensor_ptr)
return capture_ptr;
return nullptr; return nullptr;
} }
......
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