diff options
author | Petr Mrázek <peterix@gmail.com> | 2017-12-03 19:21:04 +0100 |
---|---|---|
committer | Petr Mrázek <peterix@gmail.com> | 2017-12-03 19:21:04 +0100 |
commit | 4bae6fe491c8c92286c4ac9f39e9d4ac846d4f2f (patch) | |
tree | 2da09958eae5379e8ecb2bd20c8a17e57f5ddf3b /application/pages/global/ExternalToolsPage.cpp | |
parent | 95e6f37d3942d4ab681e2f2484f17bbf8489c332 (diff) | |
download | MultiMC-4bae6fe491c8c92286c4ac9f39e9d4ac846d4f2f.tar MultiMC-4bae6fe491c8c92286c4ac9f39e9d4ac846d4f2f.tar.gz MultiMC-4bae6fe491c8c92286c4ac9f39e9d4ac846d4f2f.tar.lz MultiMC-4bae6fe491c8c92286c4ac9f39e9d4ac846d4f2f.tar.xz MultiMC-4bae6fe491c8c92286c4ac9f39e9d4ac846d4f2f.zip |
GH-2050 fix cancel button in file browse dialogs filling text fields
Diffstat (limited to 'application/pages/global/ExternalToolsPage.cpp')
-rw-r--r-- | application/pages/global/ExternalToolsPage.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/application/pages/global/ExternalToolsPage.cpp b/application/pages/global/ExternalToolsPage.cpp index b446fc06..a1a029ff 100644 --- a/application/pages/global/ExternalToolsPage.cpp +++ b/application/pages/global/ExternalToolsPage.cpp @@ -206,12 +206,12 @@ void ExternalToolsPage::on_jsonEditorBrowseBtn_clicked() ? QStandardPaths::standardLocations(QStandardPaths::ApplicationsLocation).first() #endif : ui->jsonEditorTextBox->text()); - QString cooked_file = FS::NormalizePath(raw_file); - if (cooked_file.isEmpty()) + if (raw_file.isEmpty()) { return; } + QString cooked_file = FS::NormalizePath(raw_file); // it has to exist and be an executable if (QFileInfo(cooked_file).exists() && QFileInfo(cooked_file).isExecutable()) |