summaryrefslogtreecommitdiff
path: root/lotuswordpro/source
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2017-04-11 10:50:33 +0100
committerCaolán McNamara <caolanm@redhat.com>2017-04-11 10:51:07 +0100
commitda78742e189966bd6e7f49390164132684928756 (patch)
tree0daa3c5b2e198e915415f06aa78873bd9c2209ee /lotuswordpro/source
parente1c83d0514e6123faa50ad0a7aa6a9031b271c9a (diff)
ofz: loop in lwp layout
Change-Id: Ic0a6a3c77b82e001829d8d9d7163e1b2141d8a0c
Diffstat (limited to 'lotuswordpro/source')
-rw-r--r--lotuswordpro/source/filter/lwplayout.cxx8
1 files changed, 7 insertions, 1 deletions
diff --git a/lotuswordpro/source/filter/lwplayout.cxx b/lotuswordpro/source/filter/lwplayout.cxx
index 7ea7e2d2f2a7..3c32355e776d 100644
--- a/lotuswordpro/source/filter/lwplayout.cxx
+++ b/lotuswordpro/source/filter/lwplayout.cxx
@@ -1370,7 +1370,13 @@ rtl::Reference<LwpVirtualLayout> LwpMiddleLayout::GetWaterMarkLayout()
{
return xLay;
}
- xLay.set(dynamic_cast<LwpVirtualLayout*>(xLay->GetNext().obj().get()));
+ rtl::Reference<LwpVirtualLayout> xNext(dynamic_cast<LwpVirtualLayout*>(xLay->GetNext().obj().get()));
+ if (xNext == xLay)
+ {
+ SAL_WARN("lwp", "loop in layout");
+ break;
+ }
+ xLay = xNext;
}
return rtl::Reference<LwpVirtualLayout>();
}