From f00e6292278098be00b17e10cff99aa56061948d Mon Sep 17 00:00:00 2001 From: Marco Benelli Date: Thu, 26 Jan 2017 11:28:22 +0100 Subject: [PATCH] SCXML editor: fix crash on pressing copy/cut QtCreator used to crash when copy or cut button were pressed without having selected an item. Task-number: QTCREATORBUG-17637 Change-Id: Iceaea7a9f826ed16c4caee9fc28b4c14eb304c62 Reviewed-by: Alessandro Portale --- src/plugins/scxmleditor/plugin_interface/graphicsscene.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/plugins/scxmleditor/plugin_interface/graphicsscene.cpp b/src/plugins/scxmleditor/plugin_interface/graphicsscene.cpp index abbe889472e..e5681fbc6e6 100644 --- a/src/plugins/scxmleditor/plugin_interface/graphicsscene.cpp +++ b/src/plugins/scxmleditor/plugin_interface/graphicsscene.cpp @@ -216,6 +216,9 @@ void GraphicsScene::removeSelectedItems() void GraphicsScene::copy() { + if (!m_document->currentTag()) + return; + QPointF minPos; QVector tags; if (m_document->currentTag()->tagType() == Scxml) {