mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-31 20:58:07 -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:
committed by
sledgehammer999
parent
0ad8dc39e5
commit
0cd4900e92
@@ -152,10 +152,8 @@ void Net::DownloadManager::initInstance()
|
||||
|
||||
void Net::DownloadManager::freeInstance()
|
||||
{
|
||||
if (m_instance) {
|
||||
delete m_instance;
|
||||
m_instance = nullptr;
|
||||
}
|
||||
delete m_instance;
|
||||
m_instance = nullptr;
|
||||
}
|
||||
|
||||
Net::DownloadManager *Net::DownloadManager::instance()
|
||||
|
||||
Reference in New Issue
Block a user