diff options
author | Arnaud Versini <arnaud.versini@gmail.com> | 2013-05-04 17:45:47 +0200 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2013-05-06 13:28:39 +0000 |
commit | 759c301785a703188b52d01ded2f96ff3f6eb7f9 (patch) | |
tree | e9feb96495d30203f4100cdf7deb751ad2809fca | |
parent | d526091eb19c264de8014e6ac142819460604373 (diff) |
SW : Fix crash by checking find result
Change-Id: I6caf18b110dd0a40f09e185c00cb238261457db3
Reviewed-on: https://gerrit.libreoffice.org/3783
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Eike Rathke <erack@redhat.com>
-rw-r--r-- | sw/source/core/txtnode/ndtxt.cxx | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sw/source/core/txtnode/ndtxt.cxx b/sw/source/core/txtnode/ndtxt.cxx index 437cf447a91b..07f36ef82d06 100644 --- a/sw/source/core/txtnode/ndtxt.cxx +++ b/sw/source/core/txtnode/ndtxt.cxx @@ -3211,7 +3211,10 @@ ModelToViewHelper::ModelToViewHelper(const SwTxtNode &rNode, int eMode) if (aHiddenMulti.IsSelected(nDummyCharPos)) continue; std::vector<block>::iterator aFind = std::find_if(aBlocks.begin(), aBlocks.end(), containsPos(nDummyCharPos)); - aFind->m_aAttrs.push_back(pAttr); + if (aFind != aBlocks.end()) + { + aFind->m_aAttrs.push_back(pAttr); + } } } } |