diff --git a/source/RobotAPI/gui-plugins/RobotUnitPlugin/RobotUnitControlDevicesWidget.cpp b/source/RobotAPI/gui-plugins/RobotUnitPlugin/RobotUnitControlDevicesWidget.cpp index 2e81fee7d120ffd45a3f2a2355042f05bedb3465..686f0c40ef4db27e5ac67d05b64ee4c881c92ee0 100644 --- a/source/RobotAPI/gui-plugins/RobotUnitPlugin/RobotUnitControlDevicesWidget.cpp +++ b/source/RobotAPI/gui-plugins/RobotUnitPlugin/RobotUnitControlDevicesWidget.cpp @@ -114,6 +114,10 @@ namespace armarx void RobotUnitControlDevicesWidget::update(const ControlDeviceStatus& status) { std::lock_guard<std::recursive_mutex> guard {mutex}; + if (!robotUnit) + { + return; + } if (!entries.count(status.deviceName)) { add(robotUnit->getControlDeviceDescription(status.deviceName)); diff --git a/source/RobotAPI/gui-plugins/RobotUnitPlugin/RobotUnitLVL1ControllersWidget.cpp b/source/RobotAPI/gui-plugins/RobotUnitPlugin/RobotUnitLVL1ControllersWidget.cpp index 61d4a7d68909a6c293ac077cc7597e9792317060..1f7465178d765b64e81cfcedad18f6d706d599db 100644 --- a/source/RobotAPI/gui-plugins/RobotUnitPlugin/RobotUnitLVL1ControllersWidget.cpp +++ b/source/RobotAPI/gui-plugins/RobotUnitPlugin/RobotUnitLVL1ControllersWidget.cpp @@ -93,6 +93,10 @@ namespace armarx void RobotUnitLVL1ControllersWidget::lVl1ControllerStatusChanged() { std::lock_guard<std::recursive_mutex> guard {statusUpdatesMutex}; + if (!robotUnit) + { + return; + } for (const auto& pair : statusUpdates) { lvl1ControllerCreated(pair.second.instanceName); @@ -104,6 +108,10 @@ namespace armarx void RobotUnitLVL1ControllersWidget::lvl1ControllerCreated(std::string name) { std::lock_guard<std::recursive_mutex> guard {mutex}; + if (!robotUnit) + { + return; + } if (!entries.count(name)) { entries[name] = new RobotUnitLVL1ControllersWidgetEntry(*this, *(ui->treeWidget), robotUnit->getLVL1ControllerDescription(name)); diff --git a/source/RobotAPI/gui-plugins/RobotUnitPlugin/RobotUnitSensorDevicesWidget.cpp b/source/RobotAPI/gui-plugins/RobotUnitPlugin/RobotUnitSensorDevicesWidget.cpp index 067f5da67282f7206e2bc4bff24ce99bc61f228f..d78137a38f0f0d536fcbd88cccdb6ba048906665 100644 --- a/source/RobotAPI/gui-plugins/RobotUnitPlugin/RobotUnitSensorDevicesWidget.cpp +++ b/source/RobotAPI/gui-plugins/RobotUnitPlugin/RobotUnitSensorDevicesWidget.cpp @@ -66,6 +66,10 @@ namespace armarx void RobotUnitSensorDevicesWidget::sensorDeviceStatusChanged() { std::lock_guard<std::recursive_mutex> guard {statusUpdatesMutex}; + if (!robotUnit) + { + return; + } for (const auto& pair : statusUpdates) { if (!entries.count(pair.second.deviceName))