diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-12-13 12:29:29 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-12-13 12:29:29 +0000 |
commit | 1deae8a2d92747ad69b024513ddae93cc8927d29 (patch) | |
tree | 6f0c4b9aede9a1d6c365729c50e6d9b4ac379717 /lotuswordpro/source/filter/lwplayout.cxx | |
parent | 2487ba80581d8b0f50be40a26255789e1a050e95 (diff) |
deploy references to keep layout alive long enough
Change-Id: I670f00b0beb77e5014c3dd4a4798e69ece882b87
Diffstat (limited to 'lotuswordpro/source/filter/lwplayout.cxx')
-rw-r--r-- | lotuswordpro/source/filter/lwplayout.cxx | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lotuswordpro/source/filter/lwplayout.cxx b/lotuswordpro/source/filter/lwplayout.cxx index 3e58fa90de8f..e4a9112904ad 100644 --- a/lotuswordpro/source/filter/lwplayout.cxx +++ b/lotuswordpro/source/filter/lwplayout.cxx @@ -330,12 +330,12 @@ LwpVirtualLayout* LwpVirtualLayout::GetParentLayout() void LwpVirtualLayout::RegisterChildStyle() { //Register all children styles - LwpVirtualLayout* pLayout = dynamic_cast<LwpVirtualLayout*>(GetChildHead().obj().get()); - while(pLayout) + rtl::Reference<LwpVirtualLayout> xLayout(dynamic_cast<LwpVirtualLayout*>(GetChildHead().obj().get())); + while (xLayout.is()) { - pLayout->SetFoundry(m_pFoundry); - pLayout->RegisterStyle(); - pLayout = dynamic_cast<LwpVirtualLayout*>(pLayout->GetNext().obj().get()); + xLayout->SetFoundry(m_pFoundry); + xLayout->RegisterStyle(); + xLayout.set(dynamic_cast<LwpVirtualLayout*>(xLayout->GetNext().obj().get())); } } |