summaryrefslogtreecommitdiff
path: root/lotuswordpro/source/filter/lwplayout.cxx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2015-12-13 00:06:37 +0000
committerCaolán McNamara <caolanm@redhat.com>2015-12-13 00:06:37 +0000
commit5df326438fd3a5613a52b4de1935426911ff1301 (patch)
treedb2ac4909c9e769de76b1171733f7bca85ab86af /lotuswordpro/source/filter/lwplayout.cxx
parentc910e229aa19edd0502aa05dffedc91dd727da6f (diff)
guard against infinite recursion
Change-Id: I7c55986fba87dea0c519f60240605db03262dfe9
Diffstat (limited to 'lotuswordpro/source/filter/lwplayout.cxx')
-rw-r--r--lotuswordpro/source/filter/lwplayout.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/lotuswordpro/source/filter/lwplayout.cxx b/lotuswordpro/source/filter/lwplayout.cxx
index cf3742d1315e..1bef40821ef1 100644
--- a/lotuswordpro/source/filter/lwplayout.cxx
+++ b/lotuswordpro/source/filter/lwplayout.cxx
@@ -139,7 +139,7 @@ bool LwpVirtualLayout::HonorProtection()
return false;
LwpVirtualLayout* pParent = dynamic_cast<LwpVirtualLayout*> (GetParent().obj().get());
- if(pParent && !pParent->IsHeader())
+ if (pParent && !pParent->IsHeader() && pParent != this)
{
return pParent->HonorProtection();
}
@@ -199,7 +199,7 @@ bool LwpVirtualLayout::HasProtection()
return true;
LwpVirtualLayout* pParent = dynamic_cast<LwpVirtualLayout*> (GetParent().obj().get());
- if(pParent && !pParent->IsHeader())
+ if (pParent && !pParent->IsHeader() && pParent != this)
{
return pParent->HasProtection();
}