Commit 8e28484a authored by Daniel Teske's avatar Daniel Teske

RessourceEditor: Fix crash on adding prefix

Change-Id: I27624c5327891ae4ec9e045738577f48cbd824a6
Task-number: QTCREATORBUG-15034
Reviewed-by: default avatarEike Ziller <eike.ziller@theqtcompany.com>
parent 7448db84
......@@ -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());
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment