diff options
Diffstat (limited to 'vcl/source/uipreviewer/previewer.cxx')
-rw-r--r-- | vcl/source/uipreviewer/previewer.cxx | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/vcl/source/uipreviewer/previewer.cxx b/vcl/source/uipreviewer/previewer.cxx index e889e78f8644..bb93b1207dd8 100644 --- a/vcl/source/uipreviewer/previewer.cxx +++ b/vcl/source/uipreviewer/previewer.cxx @@ -68,8 +68,7 @@ int UIPreviewApp::Main() try { - Dialog *pDialog = new Dialog(DIALOG_NO_PARENT, WB_STDDIALOG | WB_SIZEABLE); - + VclPtrInstance<Dialog> pDialog(DIALOG_NO_PARENT, WB_STDDIALOG | WB_SIZEABLE); { VclBuilder aBuilder(pDialog, OUString(), uifiles[0]); vcl::Window *pRoot = aBuilder.get_widget_root(); @@ -90,7 +89,7 @@ int UIPreviewApp::Main() pRealDialog->Execute(); } - delete pDialog; + pDialog.disposeAndClear(); } catch (const uno::Exception &e) { |