diff --git a/src/gui/Src/Gui/FavouriteTools.cpp b/src/gui/Src/Gui/FavouriteTools.cpp index aa161c82..0f04b738 100644 --- a/src/gui/Src/Gui/FavouriteTools.cpp +++ b/src/gui/Src/Gui/FavouriteTools.cpp @@ -124,7 +124,7 @@ void FavouriteTools::on_btnAddFavouriteTool_clicked() memset(buffer, 0, sizeof(buffer)); BridgeSettingGet("Favourite", "LastToolPath", buffer); BrowseDialog browse(this, tr("Browse tool"), tr("Enter the path of the tool."), tr("Executable Files (*.exe);;All Files (*.*)"), QString(buffer), false); - if(browse.exec() != QDialog::Accepted && browse.path.length()) + if(browse.exec() != QDialog::Accepted || browse.path.length() == 0) return; filename = browse.path; BridgeSettingSet("Favourite", "LastToolPath", filename.toUtf8().constData());