mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-20 07:27:22 -06:00
Prevent self-assignment in assignment operator
This commit is contained in:
@@ -440,7 +440,10 @@ bool AutoDownloadRule::accepts(const QVariantHash &articleData)
|
||||
|
||||
AutoDownloadRule &AutoDownloadRule::operator=(const AutoDownloadRule &other)
|
||||
{
|
||||
m_dataPtr = other.m_dataPtr;
|
||||
if (this != &other)
|
||||
{
|
||||
m_dataPtr = other.m_dataPtr;
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user