[Libreoffice-commits] core.git: sw/source
Arnaud Versini
arnaud.versini at gmail.com
Mon May 6 06:28:58 PDT 2013
sw/source/core/txtnode/ndtxt.cxx | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
New commits:
commit 759c301785a703188b52d01ded2f96ff3f6eb7f9
Author: Arnaud Versini <arnaud.versini at gmail.com>
Date: Sat May 4 17:45:47 2013 +0200
SW : Fix crash by checking find result
Change-Id: I6caf18b110dd0a40f09e185c00cb238261457db3
Reviewed-on: https://gerrit.libreoffice.org/3783
Reviewed-by: Eike Rathke <erack at redhat.com>
Tested-by: Eike Rathke <erack at redhat.com>
diff --git a/sw/source/core/txtnode/ndtxt.cxx b/sw/source/core/txtnode/ndtxt.cxx
index 437cf44..07f36ef 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);
+ }
}
}
}
More information about the Libreoffice-commits
mailing list