summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/corelib/kernel/qcore_mac_p.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/corelib/kernel/qcore_mac_p.h b/src/corelib/kernel/qcore_mac_p.h
index 30590ef2303..51efe0fe328 100644
--- a/src/corelib/kernel/qcore_mac_p.h
+++ b/src/corelib/kernel/qcore_mac_p.h
@@ -504,6 +504,9 @@ public:
QObjCWeakPointer &operator=(const QObjCWeakPointer &other)
{
QMacAutoReleasePool pool;
+#if !USE_OBJC_WEAK
+ objc_setAssociatedObject(m_object, this, nil, OBJC_ASSOCIATION_RETAIN);
+#endif
m_object = other.m_object;
#if !USE_OBJC_WEAK
trackObjectLifetime();