summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/corelib/tools/qsharedpointer_impl.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/corelib/tools/qsharedpointer_impl.h b/src/corelib/tools/qsharedpointer_impl.h
index 3d20f4dca9..50b3bcf0c4 100644
--- a/src/corelib/tools/qsharedpointer_impl.h
+++ b/src/corelib/tools/qsharedpointer_impl.h
@@ -332,7 +332,8 @@ public:
}
inline QSharedPointer &operator=(QSharedPointer &&other)
{
- swap(other);
+ QSharedPointer moved(std::move(other));
+ swap(moved);
return *this;
}
#endif