summaryrefslogtreecommitdiff
path: root/cui/source/dialogs/cuicharmap.cxx
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2020-08-25 00:01:03 +0200
committerMike Kaganski <mike.kaganski@collabora.com>2020-08-25 00:48:20 +0200
commit3b386467f2d4b2b96b7e697d9f5b133819f6180e (patch)
treef6dffa4dc9cd96f0a23ff8d76ede9facb4c3968e /cui/source/dialogs/cuicharmap.cxx
parent76a6737ef669935892a5ae73711a8ca2a2df88f9 (diff)
tdf#135997: properly check loop condition
It should break when any of iterators reaches end, not only when both. Introduced in commit 710a39414569995bd5a8631a948c939dc73bcef9. The crash dump from the bug report points to one of these lines; this is a blind fix, since I cannot reproduce myself. Change-Id: Ie7f6b827256cdb7061901dc9b2ae5ee8e0222a38 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101162 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'cui/source/dialogs/cuicharmap.cxx')
-rw-r--r--cui/source/dialogs/cuicharmap.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/cui/source/dialogs/cuicharmap.cxx b/cui/source/dialogs/cuicharmap.cxx
index 3f3651bce366..13d3c8e7658b 100644
--- a/cui/source/dialogs/cuicharmap.cxx
+++ b/cui/source/dialogs/cuicharmap.cxx
@@ -261,7 +261,7 @@ void SvxCharacterMap::updateRecentCharControl()
{
int i = 0;
for ( std::deque< OUString >::iterator it = maRecentCharList.begin(), it2 = maRecentCharFontList.begin();
- it != maRecentCharList.end() || it2 != maRecentCharFontList.end();
+ it != maRecentCharList.end() && it2 != maRecentCharFontList.end();
++it, ++it2, i++)
{
m_aRecentCharView[i].SetText(*it);
@@ -360,7 +360,7 @@ void SvxCharacterMap::updateFavCharControl()
{
int i = 0;
for ( std::deque< OUString >::iterator it = maFavCharList.begin(), it2 = maFavCharFontList.begin();
- it != maFavCharList.end() || it2 != maFavCharFontList.end();
+ it != maFavCharList.end() && it2 != maFavCharFontList.end();
++it, ++it2, i++)
{
m_aFavCharView[i].SetText(*it);