From 8e28484ace3ba7505238d35012e4ec16d63b6c4f Mon Sep 17 00:00:00 2001 From: Daniel Teske Date: Tue, 8 Sep 2015 13:01:55 +0200 Subject: RessourceEditor: Fix crash on adding prefix Change-Id: I27624c5327891ae4ec9e045738577f48cbd824a6 Task-number: QTCREATORBUG-15034 Reviewed-by: Eike Ziller --- src/plugins/resourceeditor/resourceeditorplugin.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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(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(ProjectTree::currentNode()); topLevel->addPrefix(prefix, dialog.lang()); } -- cgit v1.2.1