Many fixes to file loading to prevent crashes and make failure more

clear.
This commit is contained in:
Collin Kidder
2020-08-16 18:30:43 -04:00
parent b667351cbb
commit 4887ac8e62
2 changed files with 58 additions and 39 deletions
+6 -3
View File
@@ -657,10 +657,13 @@ void MainWindow::handleLoadFile()
if (!loadResult)
{
confirmDialog = QMessageBox::question(this, "Error Loading", "Do you want to salvage what could be loaded?",
if (tempFrames.count() > 0) //only ask if at least one frame was decoded.
{
confirmDialog = QMessageBox::question(this, "Error Loading", "Do you want to salvage what could be loaded?",
QMessageBox::Yes|QMessageBox::No);
if (confirmDialog == QMessageBox::Yes) {
loadResult = true;
if (confirmDialog == QMessageBox::Yes) {
loadResult = true;
}
}
}