When switching between image topics (in my case especially when switching from a topic with rgb images to a topic with depth images) sometimes a segmentation fault occurs. I think this is the problematic line and the error occurs when something goes out of scope here. Maybe a destructor is called on something that should not be destructed?