From 2da3a4ab43ad266db880c5afbbd39ab2b6e772f8 Mon Sep 17 00:00:00 2001 From: Jochen Becher Date: Sun, 16 Jul 2017 19:56:02 +0200 Subject: [PATCH] ModelEditor: Fix crash pressing shift on a size-locked object Change-Id: Ifcdd5010369a71649a5f34c72c81ec9a30556bc7 Reviewed-by: Tobias Hunger --- src/libs/modelinglib/qmt/diagram_scene/items/objectitem.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/libs/modelinglib/qmt/diagram_scene/items/objectitem.cpp b/src/libs/modelinglib/qmt/diagram_scene/items/objectitem.cpp index f3baab33922..351c102747d 100644 --- a/src/libs/modelinglib/qmt/diagram_scene/items/objectitem.cpp +++ b/src/libs/modelinglib/qmt/diagram_scene/items/objectitem.cpp @@ -210,6 +210,8 @@ void ObjectItem::setFocusSelected(bool focusSelected) ILatchable::Action ObjectItem::horizontalLatchAction() const { + if (!m_selectionMarker) + return Move; switch (m_selectionMarker->activeHandle()) { case RectangularSelectionItem::HandleTopLeft: case RectangularSelectionItem::HandleLeft: @@ -232,6 +234,8 @@ ILatchable::Action ObjectItem::horizontalLatchAction() const ILatchable::Action ObjectItem::verticalLatchAction() const { + if (!m_selectionMarker) + return Move; switch (m_selectionMarker->activeHandle()) { case RectangularSelectionItem::HandleTopLeft: case RectangularSelectionItem::HandleTop: