From 4bae6fe491c8c92286c4ac9f39e9d4ac846d4f2f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Mr=C3=A1zek?= Date: Sun, 3 Dec 2017 19:21:04 +0100 Subject: GH-2050 fix cancel button in file browse dialogs filling text fields --- application/pages/global/ExternalToolsPage.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'application/pages/global/ExternalToolsPage.cpp') 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()) -- cgit v1.2.3