fixed #837 (empty path crashes BrowserDialog)

This commit is contained in:
Thomas Jentzsch 2021-11-14 15:08:58 +01:00
parent cb02e454aa
commit 1635d4fb02
1 changed files with 1 additions and 1 deletions

View File

@ -329,7 +329,7 @@ void BrowserDialog::updateUI(bool fileSelected)
enable = !_selected->getText().empty(); enable = !_selected->getText().empty();
_okWidget->setEnabled(enable); _okWidget->setEnabled(enable);
if(fileSelected && !_fileList->selected().isDirectory()) if(fileSelected && _fileList->getList().size() && !_fileList->selected().isDirectory())
_selected->setText(_fileList->getSelectedString()); _selected->setText(_fileList->getSelectedString());
} }