Release file lock if reading failed.

This commit is contained in:
Roman Telezhynskyi 2021-09-04 15:59:20 +03:00
parent 7d16cae718
commit 005d5fdafd

View File

@ -253,6 +253,7 @@ auto VPMainWindow::LoadFile(QString path) -> bool
{ {
qCCritical(pWindow, "%s\n\n%s\n\n%s", qUtf8Printable(tr("File error.")), qCCritical(pWindow, "%s\n\n%s\n\n%s", qUtf8Printable(tr("File error.")),
qUtf8Printable(e.ErrorMessage()), qUtf8Printable(e.DetailedInformation())); qUtf8Printable(e.ErrorMessage()), qUtf8Printable(e.DetailedInformation()));
lock.reset();
return false; return false;
} }