If the function exits here: https://github.com/shadow-robot/ros_ethercat/blob/indigo-devel/ros_ethercat_eml/src/ethercat_AL.cxx#L116 then m_slave_handler pointed object is not instantiated here: https://github.com/shadow-robot/ros_ethercat/blob/indigo-devel/ros_ethercat_eml/src/ethercat_AL.cxx#L121 And generates a segfault with `malloc.c: No such file or directory` when the destructor tries to delete it here: https://github.com/shadow-robot/ros_ethercat/blob/indigo-devel/ros_ethercat_eml/src/ethercat_AL.cxx#L72 Probably we should check `if (m_slave_handler)` before deleting?
If the function exits here:
https://github.com/shadow-robot/ros_ethercat/blob/indigo-devel/ros_ethercat_eml/src/ethercat_AL.cxx#L116
then m_slave_handler pointed object is not instantiated here:
https://github.com/shadow-robot/ros_ethercat/blob/indigo-devel/ros_ethercat_eml/src/ethercat_AL.cxx#L121
And generates a segfault with
malloc.c: No such file or directorywhen the destructor tries to delete it here:https://github.com/shadow-robot/ros_ethercat/blob/indigo-devel/ros_ethercat_eml/src/ethercat_AL.cxx#L72
Probably we should check
if (m_slave_handler)before deleting?