diff options
author | Aki Koskinen <qt@akikoskinen.info> | 2015-01-06 09:06:42 +0200 |
---|---|---|
committer | Nikolai Kosjar <nikolai.kosjar@theqtcompany.com> | 2015-01-07 12:05:50 +0100 |
commit | 7661ba74eda5b896f94286eb882efb216708ba4f (patch) | |
tree | eb48440af6a670c03a38071989f5f562211daa3f /src/tools/cplusplus-update-frontend/cplusplus-update-frontend.cpp | |
parent | e6f94433947ced362ac1a21eca064367973a2104 (diff) | |
download | qt-creator-7661ba74eda5b896f94286eb882efb216708ba4f.tar.gz |
Prevent using an invalidated reference
Inserting to a std::vector (possibly) invalidates all iterators and
references for it.
In this piece of code tok is a reference to a member in _tokens and it
should not be used after an insertion is made to _tokens. Switched the
order of two code lines to prevent this.
Change-Id: Ia9d1ce66fc67406f56b426e7431402c6fe68a38f
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
Diffstat (limited to 'src/tools/cplusplus-update-frontend/cplusplus-update-frontend.cpp')
0 files changed, 0 insertions, 0 deletions