summaryrefslogtreecommitdiffstats
path: root/src/corelib/kernel/qpointer.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib/kernel/qpointer.h')
-rw-r--r--src/corelib/kernel/qpointer.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/corelib/kernel/qpointer.h b/src/corelib/kernel/qpointer.h
index 016658ee60..3e92289792 100644
--- a/src/corelib/kernel/qpointer.h
+++ b/src/corelib/kernel/qpointer.h
@@ -83,7 +83,7 @@ public:
{ wp.assign(static_cast<QObjectType*>(p)); return *this; }
inline T* data() const
- { return static_cast<T*>( wp.data()); }
+ { return static_cast<T*>(wp.d == nullptr || wp.d->strongref.load() == 0 ? nullptr : wp.value); }
inline T* operator->() const
{ return data(); }
inline T& operator*() const