summaryrefslogtreecommitdiff
path: root/sw/source
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2014-09-11 10:34:51 +0200
committerMichael Stahl <mstahl@redhat.com>2014-09-11 10:34:51 +0200
commit5979ab84e8a0038a1225020e19e4b884423247fc (patch)
treec6c1ac240b105d4bee0feed0f8db79289c914f53 /sw/source
parentcd994fc07f82bf950410bbdc88fbc4de7805547a (diff)
sw: actually check that iterator is valid
Change-Id: Icefedf1d3fe09ed6670481dcdc4c5e745e816b1b
Diffstat (limited to 'sw/source')
-rw-r--r--sw/source/core/crsr/crstrvl.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/sw/source/core/crsr/crstrvl.cxx b/sw/source/core/crsr/crstrvl.cxx
index ab6c2d41f9a8..898f56b118bc 100644
--- a/sw/source/core/crsr/crstrvl.cxx
+++ b/sw/source/core/crsr/crstrvl.cxx
@@ -635,7 +635,7 @@ lcl_FindField(bool & o_rFound, _SetGetExpFlds const& rSrtLst,
_SetGetExpFlds::const_iterator it = rSrtLst.lower_bound(pSrch.get());
- o_rFound = (**it == *pSrch);
+ o_rFound = (it == rSrtLst.end()) ? false : (**it == *pSrch);
return it;
}