diff options
author | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2018-11-01 01:01:28 +0100 |
---|---|---|
committer | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2018-11-01 01:01:28 +0100 |
commit | f09fc1f35294827245e74ced48274387d5ed346f (patch) | |
tree | 4c07e40a13fd5be82f2afe4a38165b46dd385d34 /src/corelib/tools | |
parent | cc9645f11b46aaad36658d62d38a5e44a5ba5ae5 (diff) | |
parent | f5c0a19077989b5ac14071ecd095e29f62d05602 (diff) |
Merge remote-tracking branch 'origin/5.12' into dev
Change-Id: I6f8d3abd3247dc980dc7834801a017a89c8f4286
Diffstat (limited to 'src/corelib/tools')
-rw-r--r-- | src/corelib/tools/qcontiguouscache.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/corelib/tools/qcontiguouscache.h b/src/corelib/tools/qcontiguouscache.h index faa7263d6b..fdb9c6d19a 100644 --- a/src/corelib/tools/qcontiguouscache.h +++ b/src/corelib/tools/qcontiguouscache.h @@ -217,6 +217,7 @@ void QContiguousCache<T>::setCapacity(int asize) detach(); union { QContiguousCacheData *d; QContiguousCacheTypedData<T> *p; } x; x.d = allocateData(asize); + x.d->ref.store(1); x.d->alloc = asize; x.d->count = qMin(d->count, asize); x.d->offset = d->offset + d->count - x.d->count; |