Fix crashes in OpenPoseEstimation when onDisconnectImageProcessor is called
This fixes OpenPoseEstimation
crashing whenever onDisconnectImageprocessor
was called (for example when the ImageProvider was restarted).
Rationale
The problem was, that the member variable OpenPoseEstimation::calibration
was deleted, and afterwards OpenPoseEstimation::stereoCalibration
(instance of IVT StereoCalibration
), resulting in a double-free or corruption. Double free in this case, since the destructor of StereoCalibration
deletes the instance as well, as can be seen here. OpenPoseEstimation::calibration
is initialised here from OpenPoseEstimation::stereoCalibration::GetLeftCalibration()
.
Edited by Christian Dreher