summaryrefslogtreecommitdiff
path: root/sd/source/ui/docshell/docshel2.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sd/source/ui/docshell/docshel2.cxx')
-rw-r--r--sd/source/ui/docshell/docshel2.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/sd/source/ui/docshell/docshel2.cxx b/sd/source/ui/docshell/docshel2.cxx
index cb57cba42c9d..ecb95ba5fe16 100644
--- a/sd/source/ui/docshell/docshel2.cxx
+++ b/sd/source/ui/docshell/docshel2.cxx
@@ -286,7 +286,7 @@ bool DrawDocShell::CheckPageName (vcl::Window* pWin, OUString& rName )
{
OUString aDesc( SD_RESSTR( STR_WARN_PAGE_EXISTS ) );
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
- AbstractSvxNameDialog* aNameDlg = pFact ? pFact->CreateSvxNameDialog( pWin, aStrForDlg, aDesc ) : nullptr;
+ VclPtr<AbstractSvxNameDialog> aNameDlg = pFact ? pFact->CreateSvxNameDialog( pWin, aStrForDlg, aDesc ) : nullptr;
if( aNameDlg )
{
aNameDlg->SetEditHelpId( HID_SD_NAMEDIALOG_PAGE );
@@ -302,7 +302,7 @@ bool DrawDocShell::CheckPageName (vcl::Window* pWin, OUString& rName )
aNameDlg->GetName( rName );
bIsNameValid = IsNewPageNameValid( rName );
}
- delete aNameDlg;
+ aNameDlg.disposeAndClear();
}
}