that delete of pWrapPolygon looks dodgy to me

seeing as it is only conditionally replaced later

Change-Id: I6801de8472b88f37a34aea260336750cb3c47015
This commit is contained in:
Caolán McNamara
2014-02-12 09:43:30 +00:00
parent 3337331359
commit 6f3fd680ea

View File

@@ -5287,6 +5287,7 @@ SdrObject* SvxMSDffManager::ProcessObj(SvStream& rSt,
if (SeekToContent(DFF_Prop_pWrapPolygonVertices, rSt)) if (SeekToContent(DFF_Prop_pWrapPolygonVertices, rSt))
{ {
delete pTextImpRec->pWrapPolygon; delete pTextImpRec->pWrapPolygon;
pTextImpRec->pWrapPolygon = NULL;
sal_uInt16 nNumElemVert, nNumElemMemVert, nElemSizeVert; sal_uInt16 nNumElemVert, nNumElemMemVert, nElemSizeVert;
rSt >> nNumElemVert >> nNumElemMemVert >> nElemSizeVert; rSt >> nNumElemVert >> nNumElemMemVert >> nElemSizeVert;
if (nNumElemVert && ((nElemSizeVert == 8) || (nElemSizeVert == 4))) if (nNumElemVert && ((nElemSizeVert == 8) || (nElemSizeVert == 4)))
@@ -7290,16 +7291,11 @@ SvxMSDffImportRec::SvxMSDffImportRec(const SvxMSDffImportRec& rCopy)
SvxMSDffImportRec::~SvxMSDffImportRec() SvxMSDffImportRec::~SvxMSDffImportRec()
{ {
if (pClientAnchorBuffer) delete[] pClientAnchorBuffer;
delete[] pClientAnchorBuffer; delete[] pClientDataBuffer;
if (pClientDataBuffer) delete pWrapPolygon;
delete[] pClientDataBuffer; delete pXRelTo;
if (pWrapPolygon) delete pYRelTo;
delete pWrapPolygon;
if (pXRelTo)
delete pXRelTo;
if (pYRelTo)
delete pYRelTo;
} }
void SvxMSDffManager::insertShapeId( sal_Int32 nShapeId, SdrObject* pShape ) void SvxMSDffManager::insertShapeId( sal_Int32 nShapeId, SdrObject* pShape )