summaryrefslogtreecommitdiff
path: root/lotuswordpro
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2015-12-13 16:34:46 +0000
committerCaolán McNamara <caolanm@redhat.com>2015-12-13 16:35:09 +0000
commit21e6910a75cbeaea2c80384e5f0f1c54b9207153 (patch)
tree024457214a74ca1a5463ccd44da01d3b421a4502 /lotuswordpro
parent894ac79aa3557dacee0286d79bbfb00b8f4d0be2 (diff)
use more references to fix life cycles
Change-Id: I83928638a390f434c431487b1cb13633f24de9ec (cherry picked from commit a23f7b3c14ad0e88264aca197a979aefcc9c0670)
Diffstat (limited to 'lotuswordpro')
-rw-r--r--lotuswordpro/source/filter/lwpparaproperty.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/lotuswordpro/source/filter/lwpparaproperty.cxx b/lotuswordpro/source/filter/lwpparaproperty.cxx
index 66730e2e406a..2ddd71462f35 100644
--- a/lotuswordpro/source/filter/lwpparaproperty.cxx
+++ b/lotuswordpro/source/filter/lwpparaproperty.cxx
@@ -143,8 +143,8 @@ LwpParaAlignProperty::LwpParaAlignProperty(LwpObjectStream* pFile)
LwpObjectID align;
align.ReadIndexed(pFile);
- LwpAlignmentPiece *pAlignmentPiece = dynamic_cast<LwpAlignmentPiece*>(align.obj(VO_ALIGNMENTPIECE).get());
- m_pAlignment = pAlignmentPiece ? dynamic_cast<LwpAlignmentOverride*>(pAlignmentPiece->GetOverride()) : nullptr;
+ rtl::Reference<LwpAlignmentPiece> xAlignmentPiece(dynamic_cast<LwpAlignmentPiece*>(align.obj(VO_ALIGNMENTPIECE).get()));
+ m_pAlignment = xAlignmentPiece.is() ? dynamic_cast<LwpAlignmentOverride*>(xAlignmentPiece->GetOverride()) : nullptr;
}