diff options
author | Noel Grandin <noel@peralex.com> | 2016-04-18 11:21:44 +0200 |
---|---|---|
committer | Ashod Nakashian <ashod.nakashian@collabora.co.uk> | 2016-07-20 01:26:03 -0400 |
commit | 46429c9920650c722f541445f186a34a752388a1 (patch) | |
tree | 3bf9ba06cc47a45936c50eebbc035b1b03b2d50f /sw/inc/viewsh.hxx | |
parent | d4b38602c6ae1f0ae45d3f52e15795bfaabd523c (diff) |
tdf#99352 - Some VclPtrs leak past DeInitVCL
Change-Id: I74b27b1d8b662a644df580ae128643b8495355f8
Reviewed-on: https://gerrit.libreoffice.org/24204
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
(cherry picked from commit 67d333c608a662621c1069aacdec75e45e33a183)
Diffstat (limited to 'sw/inc/viewsh.hxx')
-rw-r--r-- | sw/inc/viewsh.hxx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sw/inc/viewsh.hxx b/sw/inc/viewsh.hxx index fca7c57b3cca..dbc593b60ac4 100644 --- a/sw/inc/viewsh.hxx +++ b/sw/inc/viewsh.hxx @@ -30,6 +30,7 @@ #include <vcl/mapmod.hxx> #include <vcl/print.hxx> #include <vcl/vclptr.hxx> +#include <vcl/lazydelete.hxx> #include <LibreOfficeKit/LibreOfficeKitTypes.h> @@ -180,7 +181,7 @@ class SW_DLLPUBLIC SwViewShell : public sw::Ring<SwViewShell> protected: static ShellResource* mpShellRes; ///< Resources for the Shell. - static VclPtr<vcl::Window> mpCareWindow; ///< Avoid this window. + static vcl::DeleteOnDeinit< VclPtr<vcl::Window> > mpCareWindow; ///< Avoid this window. SwRect maVisArea; ///< The modern version of VisArea. SwDoc *mpDoc; ///< The document; never 0. @@ -438,7 +439,7 @@ public: static void SetCareWin( vcl::Window* pNew ); static vcl::Window* GetCareWin(SwViewShell& rVSh) - { return mpCareWindow ? mpCareWindow.get() : CareChildWin(rVSh); } + { return (*mpCareWindow.get()) ? mpCareWindow.get()->get() : CareChildWin(rVSh); } static vcl::Window* CareChildWin(SwViewShell& rVSh); inline SfxViewShell *GetSfxViewShell() const { return mpSfxViewShell; } |