summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools/qlinkedlist.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib/tools/qlinkedlist.h')
-rw-r--r--src/corelib/tools/qlinkedlist.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/corelib/tools/qlinkedlist.h b/src/corelib/tools/qlinkedlist.h
index bcad210d30..36cbc68eb8 100644
--- a/src/corelib/tools/qlinkedlist.h
+++ b/src/corelib/tools/qlinkedlist.h
@@ -97,7 +97,7 @@ public:
inline void detach()
{ if (d->ref != 1) detach_helper(); }
inline bool isDetached() const { return d->ref == 1; }
- inline void setSharable(bool sharable) { if (!sharable) detach(); d->sharable = sharable; }
+ inline void setSharable(bool sharable) { if (!sharable) detach(); if (d != &QLinkedListData::shared_null) d->sharable = sharable; }
inline bool isSharedWith(const QLinkedList<T> &other) const { return d == other.d; }
inline bool isEmpty() const { return d->size == 0; }