summaryrefslogtreecommitdiff
path: root/vcl/source/window/printdlg.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'vcl/source/window/printdlg.cxx')
-rw-r--r--vcl/source/window/printdlg.cxx5
1 files changed, 2 insertions, 3 deletions
diff --git a/vcl/source/window/printdlg.cxx b/vcl/source/window/printdlg.cxx
index a7ef48c01e83..084763fa934b 100644
--- a/vcl/source/window/printdlg.cxx
+++ b/vcl/source/window/printdlg.cxx
@@ -798,7 +798,7 @@ PrintDialog::~PrintDialog()
void PrintDialog::dispose()
{
- delete mpCustomOptionsUIBuilder;
+ mpCustomOptionsUIBuilder.reset();
mpTabCtrl.clear();
mpPreviewWindow.clear();
mpPageEdit.clear();
@@ -908,8 +908,7 @@ void PrintDialog::setupOptionalUI()
vcl::Window *pCustom = get<vcl::Window>("customcontents");
- delete mpCustomOptionsUIBuilder;
- mpCustomOptionsUIBuilder = new VclBuilder(pCustom, getUIRootDir(), sOptionsUIFile);
+ mpCustomOptionsUIBuilder.reset(new VclBuilder(pCustom, getUIRootDir(), sOptionsUIFile));
vcl::Window *pWindow = mpCustomOptionsUIBuilder->get_widget_root();
pWindow->Show();
continue;