diff --git a/src/base/bittorrent/torrentinfo.cpp b/src/base/bittorrent/torrentinfo.cpp index c8a6e118c..a5196e052 100644 --- a/src/base/bittorrent/torrentinfo.cpp +++ b/src/base/bittorrent/torrentinfo.cpp @@ -88,7 +88,10 @@ TorrentInfo::TorrentInfo(const TorrentInfo &other) TorrentInfo &TorrentInfo::operator=(const TorrentInfo &other) { - m_nativeInfo = other.m_nativeInfo; + if (this != &other) + { + m_nativeInfo = other.m_nativeInfo; + } return *this; } diff --git a/src/base/rss/rss_autodownloadrule.cpp b/src/base/rss/rss_autodownloadrule.cpp index ecc6b08fd..d78bb3541 100644 --- a/src/base/rss/rss_autodownloadrule.cpp +++ b/src/base/rss/rss_autodownloadrule.cpp @@ -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; }