diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-12-13 16:30:42 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-12-13 16:31:14 +0000 |
commit | 894ac79aa3557dacee0286d79bbfb00b8f4d0be2 (patch) | |
tree | 8732267b78f15dfdf18a1b8e43b84fd512c0fef0 /lotuswordpro | |
parent | 1bf5da9682e17688051af5b8ddaef9b33476b970 (diff) |
use more references to fix life cycles
Change-Id: I50fd30114b45d1225adb7bfd5d77cb89a229aac8
(cherry picked from commit a258c3a6503b4fd76ad2b0f705fdd7f472f58c4b)
Diffstat (limited to 'lotuswordpro')
-rw-r--r-- | lotuswordpro/source/filter/lwpstory.cxx | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lotuswordpro/source/filter/lwpstory.cxx b/lotuswordpro/source/filter/lwpstory.cxx index 53d76a94a8e3..ed5273030693 100644 --- a/lotuswordpro/source/filter/lwpstory.cxx +++ b/lotuswordpro/source/filter/lwpstory.cxx @@ -130,12 +130,12 @@ void LwpStory::XFConvert(XFContentContainer* pCont) void LwpStory::RegisterStyle() { - LwpPara* pPara = dynamic_cast<LwpPara*>( GetFirstPara().obj().get() ); - while(pPara) + rtl::Reference<LwpPara> xPara(dynamic_cast<LwpPara*>(GetFirstPara().obj().get())); + while (xPara.is()) { - pPara->SetFoundry(m_pFoundry); - pPara->DoRegisterStyle(); - pPara = dynamic_cast<LwpPara*>(pPara->GetNext().obj().get()); + xPara->SetFoundry(m_pFoundry); + xPara->DoRegisterStyle(); + xPara.set(dynamic_cast<LwpPara*>(xPara->GetNext().obj().get())); } } |