Skip to content
Snippets Groups Projects
Commit 51e0b5e3 authored by Jeremie Deray's avatar Jeremie Deray Committed by Jeremie Deray
Browse files

check nullptr in SensorBase/ProcessorMotion Process()

parent ea6e59ac
No related branches found
No related tags found
1 merge request!126Miscellaneous
......@@ -35,7 +35,11 @@ ProcessorMotion::~ProcessorMotion()
void ProcessorMotion::process(CaptureBasePtr _incoming_ptr)
{
if (_incoming_ptr == nullptr)
{
WOLF_ERROR("Process got a nullptr !");
return;
}
if (status_ == IDLE)
{
......
......@@ -256,6 +256,8 @@ inline void SensorBase::setHardwarePtr(const HardwareBasePtr _hw_ptr)
inline bool SensorBase::process(const CaptureBasePtr capture_ptr)
{
if (capture_ptr == nullptr) return false;
capture_ptr->setSensorPtr(shared_from_this());
for (const auto processor : processor_list_)
......
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