diff options
author | Caolán McNamara <caolanm@redhat.com> | 2020-09-25 15:08:51 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2020-09-26 22:20:50 +0200 |
commit | a352e8fe658143c30c9e6093c71cab9c06b42e6a (patch) | |
tree | 56f13d8def70a24092e99856062441056f15058e | |
parent | 7f849f8cbc2ac6618e8b9cf61570942734318295 (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/+/103408
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
-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 05e5401db18e..54af346254d6 100644 --- a/svl/source/items/slstitm.cxx +++ b/svl/source/items/slstitm.cxx @@ -125,13 +125,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"); |