summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2013-04-11 15:38:20 +0100
committerCaolán McNamara <caolanm@redhat.com>2013-04-11 15:40:24 +0100
commit60683b6de3f0ef0e9b22de5f5159086eb64e9f33 (patch)
tree58cbefc8b3d721f0f2de74deff41ac7321e96787 /sfx2
parent87cb8d784cd4d279d82aafd03d82d33843e5b316 (diff)
Resolves: fdo#63426 presentation wizard crashes
This effectively reverts the code parts of 13e8f68e82713cae2d081a236b260bda12aafa23 "fix memory leak and add some documentation" Change-Id: I66fa052f79185e1348c14e99954b04bf0a4622e5
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/inc/sfx2/docfile.hxx3
-rw-r--r--sfx2/source/appl/appopen.cxx2
2 files changed, 4 insertions, 1 deletions
diff --git a/sfx2/inc/sfx2/docfile.hxx b/sfx2/inc/sfx2/docfile.hxx
index 5aef2f2e1e7d..fcf7351f9c9f 100644
--- a/sfx2/inc/sfx2/docfile.hxx
+++ b/sfx2/inc/sfx2/docfile.hxx
@@ -71,6 +71,9 @@ class SFX2_DLLPUBLIC SfxMedium : public SvRefBase
public:
SfxMedium();
+ /**
+ * @param pSet Takes ownership
+ */
SfxMedium( const String &rName,
StreamMode nOpenMode,
const SfxFilter *pFilter = 0,
diff --git a/sfx2/source/appl/appopen.cxx b/sfx2/source/appl/appopen.cxx
index d88ecb7e9825..1e8a83274e85 100644
--- a/sfx2/source/appl/appopen.cxx
+++ b/sfx2/source/appl/appopen.cxx
@@ -375,8 +375,8 @@ sal_uIntPtr SfxApplication::LoadTemplate( SfxObjectShellLock& xDoc, const String
if ( !xDoc.Is() )
xDoc = SfxObjectShell::CreateObject( pFilter->GetServiceName() );
+ //pMedium takes ownership of pSet
SfxMedium *pMedium = new SfxMedium( rFileName, STREAM_STD_READ, pFilter, pSet );
- delete pSet;
if(!xDoc->DoLoad(pMedium))
{
ErrCode nErrCode = xDoc->GetErrorCode();