Commit 44987026 authored by lm's avatar lm

Fixed null-pointer issue for remote target if no MAV is connected

parent ab3a1ec0
......@@ -268,7 +268,7 @@ QMap3DWidget::mouseHandler(Qt::MouseButton button, MouseState state,
if (button == Qt::RightButton && state == MOUSE_STATE_DOWN)
{
QMenu menu(this);
QAction* targetAction = menu.addAction("Mark as Target");
QAction* targetAction = menu.addAction(tr("Mark as Target"));
connect(targetAction, SIGNAL(triggered()), this, SLOT(markTarget()));
menu.exec(mapToGlobal(QPoint(x, y)));
}
......@@ -339,7 +339,7 @@ QMap3DWidget::markTarget(void)
displayTarget = true;
uas->setTargetPosition(targetPosition.x, targetPosition.y,
if (uas) uas->setTargetPosition(targetPosition.x, targetPosition.y,
targetPosition.z, 0.0f);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment