diff options
author | Caolán McNamara <caolanm@redhat.com> | 2020-09-25 15:08:51 +0100 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2020-09-30 09:21:11 +0200 |
commit | 074bd08e949dd451691e9800e26b7faa87b4d4da (patch) | |
tree | 0479b9f030c84eb535d08225c065ec172920ee67 /svl | |
parent | 23e36c85d7618b588dcb59a818b5c26977686fc9 (diff) |
Related: tdf#136985 SfxStringListItem::GetString() crash in empty case
probably since...
commit a573b8b21688d9681f4fa129ec37cf89954e9d1c
Date: Sat May 21 16:14:56 2011 -0430
Replace List for std::vector in SfxStringListItem.
Change-Id: I7060b5693ba08fa5f70cc5cb3ae1b7a4722a31a7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103340
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
(cherry picked from commit 7c8f997321e136208e8983ab6ad78cc33891125f)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103572
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Diffstat (limited to 'svl')
-rw-r--r-- | svl/source/items/slstitm.cxx | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/svl/source/items/slstitm.cxx b/svl/source/items/slstitm.cxx index 225c43f08cfe..a18497a06b39 100644 --- a/svl/source/items/slstitm.cxx +++ b/svl/source/items/slstitm.cxx @@ -127,13 +127,12 @@ OUString SfxStringListItem::GetString() OUStringBuffer aStr; if ( mpList ) { - std::vector<OUString>::const_iterator iter = mpList->begin(); - for (;;) + for (auto iter = mpList->begin(), end = mpList->end(); iter != end;) { aStr.append(*iter); ++iter; - if (iter == mpList->end()) + if (iter == end) break; aStr.append("\r"); |