diff options
-rw-r--r-- | include/vcl/syswin.hxx | 3 | ||||
-rw-r--r-- | vcl/source/window/syswin.cxx | 3 |
2 files changed, 3 insertions, 3 deletions
diff --git a/include/vcl/syswin.hxx b/include/vcl/syswin.hxx index ac7a0d765c26..65e040172615 100644 --- a/include/vcl/syswin.hxx +++ b/include/vcl/syswin.hxx @@ -27,6 +27,7 @@ #include <vcl/notebookbar.hxx> #include <vcl/window.hxx> #include <o3tl/typed_flags_set.hxx> +#include <memory> class ModalDialog; class MenuBar; @@ -163,7 +164,7 @@ private: bool mbIsCalculatingInitialLayoutSize; MenuBarMode mnMenuBarMode; sal_uInt16 mnIcon; - ImplData* mpImplData; + std::unique_ptr<ImplData> mpImplData; Idle maLayoutIdle; OUString maNotebookBarUIFile; protected: diff --git a/vcl/source/window/syswin.cxx b/vcl/source/window/syswin.cxx index 6656f122ecd3..8d7460c4f9cf 100644 --- a/vcl/source/window/syswin.cxx +++ b/vcl/source/window/syswin.cxx @@ -101,8 +101,7 @@ SystemWindow::~SystemWindow() void SystemWindow::dispose() { maLayoutIdle.Stop(); - delete mpImplData; - mpImplData = nullptr; + mpImplData.reset(); // Hack to make sure code called from base ~Window does not interpret this // as a SystemWindow (which it no longer is by then): |