diff --git a/xmloff/source/transform/StyleOOoTContext.cxx b/xmloff/source/transform/StyleOOoTContext.cxx index 4f28f654541e..9d2d46c6b625 100644 --- a/xmloff/source/transform/StyleOOoTContext.cxx +++ b/xmloff/source/transform/StyleOOoTContext.cxx @@ -810,12 +810,13 @@ void XMLPropertiesOOoTContext_Impl::StartElement( XMLPersAttrListTContext *pSymbolImageContext = new XMLPersAttrListTContext( GetTransformer(), GetTransformer().GetNamespaceMap().GetQNameByKey( XML_NAMESPACE_CHART, GetXMLToken( XML_SYMBOL_IMAGE ))); + rtl::Reference xSymbolImageContext(pSymbolImageContext); OUString aAttrValue( sAttrValue ); if( GetTransformer().ConvertURIToOASIS( aAttrValue, true )) { pSymbolImageContext->AddAttribute( XML_NAMESPACE_XLINK, XML_HREF, aAttrValue ); - pContext->AddContent( pSymbolImageContext ); + pContext->AddContent(xSymbolImageContext); } } break;