aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEike Ziller <eike.ziller@qt.io>2024-04-24 12:54:30 +0200
committerEike Ziller <eike.ziller@qt.io>2024-04-24 13:10:40 +0000
commitfa54261ad383c55d0b2eeb00a7d09e3ed54b15e1 (patch)
tree0aaf6e329cbe128268d16f9dd89839ee51dc9291 /src
parent0adcf5760d9758cee7d9b7d1d88b1cf115f85f96 (diff)
QmlDesigner: Fix crash when QmlProjectManager is not enabled
The menu is created by QmlProjectManager, so it might not exist. Change-Id: Ib37d9a2b19e02616c6564a55f153c48731dac0fe Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/plugins/qmldesigner/shortcutmanager.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/plugins/qmldesigner/shortcutmanager.cpp b/src/plugins/qmldesigner/shortcutmanager.cpp
index 961aa1c952..833466a2aa 100644
--- a/src/plugins/qmldesigner/shortcutmanager.cpp
+++ b/src/plugins/qmldesigner/shortcutmanager.cpp
@@ -144,7 +144,8 @@ void ShortCutManager::registerActions(const Core::Context &qmlDesignerMainContex
Core::ActionContainer *exportMenu = Core::ActionManager::actionContainer(
QmlProjectManager::Constants::EXPORT_MENU);
- exportMenu->addAction(command, QmlProjectManager::Constants::G_EXPORT_CONVERT);
+ if (exportMenu)
+ exportMenu->addAction(command, QmlProjectManager::Constants::G_EXPORT_CONVERT);
//Close Editor
Core::ActionManager::registerAction(&m_closeCurrentEditorAction, Core::Constants::CLOSE, qmlDesignerMainContext);