Skip to content
Snippets Groups Projects
Commit 5f302ff4 authored by David Schiebener's avatar David Schiebener
Browse files

fixed a null handle exception that occurs when no orientation is given

parent 077787a9
No related branches found
No related tags found
No related merge requests found
......@@ -595,16 +595,21 @@ namespace armarx
{
VirtualRobot::LinkedCoordinate c(virtualRobot);
std::string frame;
if(position)
if (position)
{
frame = position->getFrame();
if(!frame.empty() && frame != orientation->getFrame())
throw armarx::UserException("Error: frames mismatch");
if (orientation)
{
if(!frame.empty() && frame != orientation->getFrame())
{
throw armarx::UserException("Error: frames mismatch");
}
}
}
else
{
if(!orientation)
if (!orientation)
armarx::UserException("createLinkedCoordinate: orientation and position are both NULL");
else
frame = orientation->getFrame();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment