diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-12-13 00:06:37 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-12-13 00:07:05 +0000 |
commit | fa02fa99e0e818cf8600c63110abf1cff741e594 (patch) | |
tree | 7e64465fd460207bd33c64e14dadb0706a6e3185 /lotuswordpro | |
parent | 1b48a75de052ec7a922205611637a35ae5a445e8 (diff) |
guard against infinite recursion
Change-Id: I7c55986fba87dea0c519f60240605db03262dfe9
(cherry picked from commit 5df326438fd3a5613a52b4de1935426911ff1301)
Diffstat (limited to 'lotuswordpro')
-rw-r--r-- | lotuswordpro/source/filter/lwplayout.cxx | 4 |
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(); } |