Remove redundant null checks

Attempting to delete a null pointer is a noop in C++.

Closes #2864.

[1] https://isocpp.org/wiki/faq/freestore-mgmt#delete-handles-null
This commit is contained in:
NotTsunami 2020-02-03 16:38:46 -05:00
parent c78604c7d3
commit 6748e8d787
14 changed files with 37 additions and 72 deletions

View file

@ -69,10 +69,8 @@ bool ScanFoldersModel::initInstance(QObject *parent)
void ScanFoldersModel::freeInstance()
{
if (m_instance) {
delete m_instance;
m_instance = nullptr;
}
delete m_instance;
m_instance = nullptr;
}
ScanFoldersModel *ScanFoldersModel::instance()