mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2024-12-28 08:49:42 -05:00
Make calling QSaveFile::commit() non-fatal if it's not open.
This commit is contained in:
parent
f22069bb11
commit
577609b3e3
@ -279,7 +279,10 @@ bool QSaveFile::commit()
|
||||
Q_D(QSaveFile);
|
||||
if (!d->tempFile)
|
||||
return false;
|
||||
Q_ASSERT(isOpen());
|
||||
if (!isOpen()) {
|
||||
qWarning("QSaveFile::commit: File (%s) is not open", qPrintable(fileName()));
|
||||
return false;
|
||||
}
|
||||
QIODevice::close(); // flush and close
|
||||
if (d->error != QFile::NoError) {
|
||||
d->tempFile->remove();
|
||||
|
Loading…
Reference in New Issue
Block a user