summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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