diff options
author | Michael Stahl <mstahl@redhat.com> | 2015-04-02 12:53:42 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2015-04-02 12:53:42 +0200 |
commit | 92166c8b4925d68a5a05e82c8fd28b9b244b8bd6 (patch) | |
tree | bb514ed600ddfba386161fc383fecb75b3d1f028 /editeng | |
parent | 5ece3e3525b0ef62e1b0e59ac5446aec0538d0d3 (diff) |
editeng: if this should never happen, let's assert that
Change-Id: I803282c9f080013ebee33ce1109612fff509fd6e
Diffstat (limited to 'editeng')
-rw-r--r-- | editeng/source/editeng/editobj.cxx | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/editeng/source/editeng/editobj.cxx b/editeng/source/editeng/editobj.cxx index 9751f32cf77d..03b7f04ae84e 100644 --- a/editeng/source/editeng/editobj.cxx +++ b/editeng/source/editeng/editobj.cxx @@ -970,8 +970,11 @@ void EditTextObjectImpl::GetAllSections( std::vector<editeng::Section>& rAttrs ) itAttr = std::find_if(itAttr, aAttrs.end(), FindByParagraph(nPara)); if (itAttr == aAttrs.end()) + { // This should never happen. There is a logic error somewhere... + assert(false); return; + } for (size_t i = 0; i < rC.aAttribs.size(); ++i) { @@ -986,8 +989,11 @@ void EditTextObjectImpl::GetAllSections( std::vector<editeng::Section>& rAttrs ) // Find the container whose start position matches. itCurAttr = std::find_if(itCurAttr, aAttrs.end(), FindBySectionStart(nPara, nStart)); if (itCurAttr == aAttrs.end()) + { // This should never happen. There is a logic error somewhere... + assert(false); return; + } for (; itCurAttr != aAttrs.end() && itCurAttr->mnParagraph == nPara && itCurAttr->mnEnd <= nEnd; ++itCurAttr) { |