diff --git a/src/Mod/TechDraw/Gui/QGIViewPart.cpp b/src/Mod/TechDraw/Gui/QGIViewPart.cpp index 6ab8bbaee5..c71a66824a 100644 --- a/src/Mod/TechDraw/Gui/QGIViewPart.cpp +++ b/src/Mod/TechDraw/Gui/QGIViewPart.cpp @@ -839,8 +839,8 @@ void QGIViewPart::highlightMoved(QGIHighlight* highlight, QPointF newPos) App::Document* doc = getViewObject()->getDocument(); App::DocumentObject* docObj = doc->getObject(highlightName.c_str()); auto detail = dynamic_cast(docObj); - auto oldAnchor = detail->AnchorPoint.getValue(); if (detail) { + auto oldAnchor = detail->AnchorPoint.getValue(); Base::Vector3d delta = Rez::appX(DrawUtil::toVector3d(newPos)) / getViewObject()->getScale(); delta = DrawUtil::invertY(delta); detail->AnchorPoint.setValue(oldAnchor + delta);