summaryrefslogtreecommitdiff
path: root/src/shared/qtlockedfile
diff options
context:
space:
mode:
authorTim Jenssen <tim.jenssen@qt.io>2018-11-15 19:21:12 +0100
committerAlessandro Portale <alessandro.portale@qt.io>2018-11-15 20:32:33 +0000
commit4d74cbb945d53991ae844922b532987b513e14e6 (patch)
tree7283961df11b07042a916e035f2a472c4287ea20 /src/shared/qtlockedfile
parent7ef2dccff806e0b32a99973fdf357f2ad6552f4c (diff)
downloadqt-creator-4.8.0-beta2.tar.gz
Fix reference on temperary valuev4.8.0-beta2
Old code at Context::lookupReference took via Context::ptr() a temporary QSharedPointer as an argument into a reference member which is deleted just after ReferenceContext is constructed - changing that to a general member copies this temporary QSharedPointer and fixes the problem which was there since always and that this was not crashing before was just luck. class ReferenceContext { public: ReferenceContext(const ContextPtr &context); private: const ContextPtr &m_context; }; QWeakPointer<const Context> _ptr; ContextPtr Context::ptr() const { return _ptr.toStrongRef(); } const Value *Context::lookupReference(const Value *value) const { ReferenceContext refContext(ptr()); return refContext.lookupReference(value); } Task-number: QTCREATORBUG-21510 Change-Id: Ic49a0597763fb8be65feca6f24fec105d531d6ab Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Diffstat (limited to 'src/shared/qtlockedfile')
0 files changed, 0 insertions, 0 deletions