fixed crash when QFileDialog is closed without selecting a file

This commit is contained in:
Karsten von Hornbostel
2016-03-08 21:25:27 +01:00
parent 8a8b800cee
commit c40508eb16

View File

@@ -127,7 +127,8 @@ void SpectrogramControls::fileOpenButtonClicked()
QString fileName = QFileDialog::getOpenFileName(
this, tr("Open File"), "", tr("Sample file (*.cfile *.bin);;All files (*)")
);
emit openFile(fileName);
if (!fileName.isEmpty())
emit openFile(fileName);
}
void SpectrogramControls::timeSelectionChanged(float time)