summaryrefslogtreecommitdiff
path: root/lotuswordpro
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2018-01-09 13:57:24 +0000
committerCaolán McNamara <caolanm@redhat.com>2018-01-09 17:00:52 +0100
commite285d2fcf557c79c3dff46a10ec619ae5e227ab6 (patch)
tree0e0d9c2ada0b2b06e28a27717cdf59781fa45e22 /lotuswordpro
parentca25acdb1cd0a4ef8e9954908aed9e1867fddf9d (diff)
ofz: avoid loop
Change-Id: Ie97f06188e7f824f5c5fc8968efedc231a8b9418 Reviewed-on: https://gerrit.libreoffice.org/47658 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'lotuswordpro')
-rw-r--r--lotuswordpro/source/filter/lwpstory.cxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/lotuswordpro/source/filter/lwpstory.cxx b/lotuswordpro/source/filter/lwpstory.cxx
index 19a1de7bf08e..48ef04d5af60 100644
--- a/lotuswordpro/source/filter/lwpstory.cxx
+++ b/lotuswordpro/source/filter/lwpstory.cxx
@@ -107,7 +107,10 @@ void LwpStory::XFConvert(XFContentContainer* pCont)
//Get the xfcontainer for the next para
pParaCont = xPara->GetXFContainer();
- xPara.set(dynamic_cast<LwpPara*>(xPara->GetNext().obj().get()));
+ rtl::Reference<LwpPara> xNext(dynamic_cast<LwpPara*>(xPara->GetNext().obj().get()));
+ if (xPara == xNext)
+ throw std::runtime_error("loop in conversion");
+ xPara = xNext;
}
//process frame which anchor is to cell after converter all the para