1
0
Fork 0

GUI: resolved issue #270 (crash when nothing is selected in the Yara dialog)

This commit is contained in:
Mr. eXoDia 2015-04-03 23:32:05 +02:00
parent 94f5115598
commit d4b6d757df
1 changed files with 2 additions and 0 deletions

View File

@ -55,6 +55,8 @@ void YaraRuleSelectionDialog::on_buttonFile_clicked()
void YaraRuleSelectionDialog::on_buttonSelect_clicked()
{
if(!ui->listRules->selectedItems().size()) //no selection
return;
int selectedIndex = ui->listRules->row(ui->listRules->selectedItems().at(0));
selectedFile = ruleFiles.at(selectedIndex).first;
this->accept();