summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Teske <daniel.teske@theqtcompany.com>2015-09-08 13:01:55 +0200
committerDaniel Teske <daniel.teske@theqtcompany.com>2015-09-08 11:42:09 +0000
commit8e28484ace3ba7505238d35012e4ec16d63b6c4f (patch)
tree7094a240e612416a125a022e338a5ab5e1e43546
parent7448db84482a9b96402d59676287c5a7a28373ee (diff)
downloadqt-creator-8e28484ace3ba7505238d35012e4ec16d63b6c4f.tar.gz
RessourceEditor: Fix crash on adding prefix
Change-Id: I27624c5327891ae4ec9e045738577f48cbd824a6 Task-number: QTCREATORBUG-15034 Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
-rw-r--r--src/plugins/resourceeditor/resourceeditorplugin.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/resourceeditor/resourceeditorplugin.cpp b/src/plugins/resourceeditor/resourceeditorplugin.cpp
index 4eefe8fb51..1c20bf1d58 100644
--- a/src/plugins/resourceeditor/resourceeditorplugin.cpp
+++ b/src/plugins/resourceeditor/resourceeditorplugin.cpp
@@ -236,13 +236,13 @@ void ResourceEditorPlugin::onRefresh()
void ResourceEditorPlugin::addPrefixContextMenu()
{
+ auto topLevel = static_cast<ResourceTopLevelNode *>(ProjectTree::currentNode());
PrefixLangDialog dialog(tr("Add Prefix"), QString(), QString(), Core::ICore::mainWindow());
if (dialog.exec() != QDialog::Accepted)
return;
QString prefix = dialog.prefix();
if (prefix.isEmpty())
return;
- ResourceTopLevelNode *topLevel = static_cast<ResourceTopLevelNode *>(ProjectTree::currentNode());
topLevel->addPrefix(prefix, dialog.lang());
}