diff --git a/source/RobotAPI/components/DebugDrawer/DebugDrawerComponent.cpp b/source/RobotAPI/components/DebugDrawer/DebugDrawerComponent.cpp index 94de0949307731e9d0ff6a6b06537459c1a4f93a..a0e70983266f5223ed1d3c1f30b935175bf17694 100644 --- a/source/RobotAPI/components/DebugDrawer/DebugDrawerComponent.cpp +++ b/source/RobotAPI/components/DebugDrawer/DebugDrawerComponent.cpp @@ -90,7 +90,8 @@ namespace armarx DebugDrawerComponent::DebugDrawerComponent(): mutex(new RecursiveMutex()), - dataUpdateMutex(new RecursiveMutex()) + dataUpdateMutex(new RecursiveMutex()), + topicMutex(new RecursiveMutex()) { cycleTimeMS = 1000.0f / 30.0f; timerSensor = NULL; @@ -138,11 +139,15 @@ namespace armarx void DebugDrawerComponent::selectionCallback(SoPath* path) { + ScopedRecursiveLockPtr l(new ScopedRecursiveLock(*topicMutex)); + listenerPrx->reportSelectionChanged(getSelections()); } void DebugDrawerComponent::deselectionCallback(SoPath* path) { + ScopedRecursiveLockPtr l(new ScopedRecursiveLock(*topicMutex)); + listenerPrx->reportSelectionChanged(getSelections()); } diff --git a/source/RobotAPI/components/DebugDrawer/DebugDrawerComponent.h b/source/RobotAPI/components/DebugDrawer/DebugDrawerComponent.h index 590af93139ee0f56d7a93755ee6f23ed29b441fc..3544112506c5ea640aef9d522c4f6688205198bd 100644 --- a/source/RobotAPI/components/DebugDrawer/DebugDrawerComponent.h +++ b/source/RobotAPI/components/DebugDrawer/DebugDrawerComponent.h @@ -473,6 +473,8 @@ namespace armarx //! The data update mutex boost::shared_ptr<boost::recursive_mutex> dataUpdateMutex; + boost::shared_ptr<boost::recursive_mutex> topicMutex; + ScopedRecursiveLockPtr getScopedAccumulatedDataLock(); DebugDrawerListenerPrx listenerPrx;