mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-18 22:47:21 -06:00
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:
@@ -77,10 +77,8 @@ void Preferences::initInstance()
|
||||
|
||||
void Preferences::freeInstance()
|
||||
{
|
||||
if (m_instance) {
|
||||
delete m_instance;
|
||||
m_instance = nullptr;
|
||||
}
|
||||
delete m_instance;
|
||||
m_instance = nullptr;
|
||||
}
|
||||
|
||||
const QVariant Preferences::value(const QString &key, const QVariant &defaultValue) const
|
||||
|
||||
Reference in New Issue
Block a user