mirror of
https://gitlab.com/obbart/universal_robots_ros_driver.git
synced 2026-04-10 01:50:46 +02:00
Added error management on illegal pointer access
This commit is contained in:
committed by
Tristan Schnell
parent
54b6da821c
commit
6c740665df
@@ -589,7 +589,11 @@ void HardwareInterface::commandCallback(const std_msgs::StringConstPtr& msg)
|
|||||||
str.append("\n");
|
str.append("\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: Check whether we can currently send code
|
if (ur_driver_ == nullptr)
|
||||||
|
{
|
||||||
|
throw std::runtime_error("Trying to use the ur_driver_ member before it is initialized. This should not happen, "
|
||||||
|
"please contact the package maintainer.");
|
||||||
|
}
|
||||||
|
|
||||||
if (ur_driver_->sendScript(str))
|
if (ur_driver_->sendScript(str))
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user