summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2015-12-10 10:13:51 +0000
committerMichael Stahl <mstahl@redhat.com>2015-12-10 15:13:25 +0000
commitc84a4af12fc83b911bf29958e83e8e2154890bfb (patch)
treea2a4fd7d9dcc7918c24733562cddaf13b533c211
parent5710f2530b6ad2c3bcf76bd90cc13c2e7bf3f456 (diff)
guard against infinite recursion
Change-Id: I43e195df570990f21c780311a98be64b682e5315 (cherry picked from commit 338c6ba3a0983009cfd1faff52ac56d6ea092d6f) Reviewed-on: https://gerrit.libreoffice.org/20583 Reviewed-by: David Tardon <dtardon@redhat.com> Tested-by: David Tardon <dtardon@redhat.com> Reviewed-by: Michael Stahl <mstahl@redhat.com>
-rw-r--r--lotuswordpro/source/filter/lwpdoc.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/lotuswordpro/source/filter/lwpdoc.cxx b/lotuswordpro/source/filter/lwpdoc.cxx
index a2ff123d6170..ba6ab5838c02 100644
--- a/lotuswordpro/source/filter/lwpdoc.cxx
+++ b/lotuswordpro/source/filter/lwpdoc.cxx
@@ -540,7 +540,7 @@ LwpDocument* LwpDocument::GetPreviousDivision()
LwpDocument* pDivision = GetLastDivision();
- while(pDivision)
+ while (pDivision && pDivision != this)
{
LwpDocument* pContentDivision = pDivision->GetLastDivisionWithContents();
if(pContentDivision)