mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2024-10-01 01:26:01 -04:00
Add assert to make sure the temp file could be opened successfully.
This commit is contained in:
parent
40f194fe4b
commit
d826ae5daf
@ -108,6 +108,8 @@ void Config::createTempFileInstance()
|
||||
{
|
||||
Q_ASSERT(!m_instance);
|
||||
QTemporaryFile* tmpFile = new QTemporaryFile(qApp);
|
||||
tmpFile->open();
|
||||
bool openResult = tmpFile->open();
|
||||
Q_ASSERT(openResult);
|
||||
Q_UNUSED(openResult);
|
||||
m_instance = new Config(tmpFile->fileName(), tmpFile);
|
||||
}
|
||||
|
@ -176,6 +176,7 @@ void KeePass2XmlWriter::writeBinaries()
|
||||
|
||||
qint64 bytesWritten = compressor.write(i.key());
|
||||
Q_ASSERT(bytesWritten == i.key().size());
|
||||
Q_UNUSED(bytesWritten);
|
||||
compressor.close();
|
||||
|
||||
buffer.seek(0);
|
||||
|
Loading…
Reference in New Issue
Block a user