diff options
Diffstat (limited to 'cui')
-rw-r--r-- | cui/source/dialogs/hldocntp.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cui/source/dialogs/hldocntp.cxx b/cui/source/dialogs/hldocntp.cxx index 962298168b49..96a2fcac3ed8 100644 --- a/cui/source/dialogs/hldocntp.cxx +++ b/cui/source/dialogs/hldocntp.cxx @@ -390,11 +390,11 @@ void SvxHyperlinkNewDocTp::DoApply () try { // check if file exists, warn before we overwrite it - SvStream* pIStm = ::utl::UcbStreamHelper::CreateStream( aURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ), StreamMode::READ ); + std::unique_ptr<SvStream> pIStm = ::utl::UcbStreamHelper::CreateStream( aURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ), StreamMode::READ ); bool bOk = pIStm && ( pIStm->GetError() == ERRCODE_NONE); - delete pIStm; + pIStm.reset(); if( bOk ) { |