diff options
Diffstat (limited to 'sources/shiboken6/tests/libsmart/smart_sharedptr.h')
-rw-r--r-- | sources/shiboken6/tests/libsmart/smart_sharedptr.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sources/shiboken6/tests/libsmart/smart_sharedptr.h b/sources/shiboken6/tests/libsmart/smart_sharedptr.h index 279e199dc..bc2b071c1 100644 --- a/sources/shiboken6/tests/libsmart/smart_sharedptr.h +++ b/sources/shiboken6/tests/libsmart/smart_sharedptr.h @@ -40,7 +40,8 @@ public: SharedPtr &operator=(const SharedPtr &other) { - mPtr = other.mPtr; + if (this != &other) + mPtr = other.mPtr; return *this; } |