summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2017-01-26 14:40:57 +0000
committerMichael Stahl <mstahl@redhat.com>2017-01-26 19:22:17 +0000
commit6198071ef3b9b30cb2b686f0a60f217f00bbef4b (patch)
tree1f62ad5442a3f111a5e75512a0b2e7d5749588a1 /vcl
parent6c61086bd3afa0793c9d52634fcd1c46063e46f9 (diff)
only alloc pDXAry if we are going to use it
Change-Id: I4fa075124ad55d3a06e1f3d21845f73778c841b6 Reviewed-on: https://gerrit.libreoffice.org/33588 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/gdi/svmconverter.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/vcl/source/gdi/svmconverter.cxx b/vcl/source/gdi/svmconverter.cxx
index 633171c4fdfb..f504f638062c 100644
--- a/vcl/source/gdi/svmconverter.cxx
+++ b/vcl/source/gdi/svmconverter.cxx
@@ -921,7 +921,6 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
sal_Int32 nStrLen( aStr.getLength() );
nDXAryLen = std::max(nAryLen, nStrLen);
- pDXAry.reset(new long[nDXAryLen]);
if (nDXAryLen < nLen)
{
@@ -934,6 +933,8 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
}
else
{
+ pDXAry.reset(new long[nDXAryLen]);
+
for (sal_Int32 j = 0; j < nAryLen; ++j)
rIStm.ReadInt32( nTmp ), pDXAry[ j ] = nTmp;