summaryrefslogtreecommitdiff
path: root/sw/inc/dcontact.hxx
diff options
context:
space:
mode:
authorBjoern Michaelsen <bjoern.michaelsen@canonical.com>2017-02-26 23:39:25 +0100
committerBjörn Michaelsen <bjoern.michaelsen@canonical.com>2017-02-27 10:58:55 +0000
commitecd77363e0c7760a9d8fd6e3e8dac8099305bb91 (patch)
tree4df348e6354f75bfe9207e49ce9ee412c290a310 /sw/inc/dcontact.hxx
parent30a76153fce5fdf578f408828651faab351e5b18 (diff)
own the SwFlyDrawObj by SwFlyDrawContact w/ unique_ptr
- the code claimed this ownership before - however it still tried to do stuff in SetMaster(..), which leads to at least memory leaking, if not worse - abort there for now - SetMaster() likely needs to be removed from the base-class proper soon as not all derived classes can possible implement it. Change-Id: Id241b9330e6f98a126949a9236c60a8783cf8ea8 Reviewed-on: https://gerrit.libreoffice.org/34663 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Björn Michaelsen <bjoern.michaelsen@canonical.com>
Diffstat (limited to 'sw/inc/dcontact.hxx')
-rw-r--r--sw/inc/dcontact.hxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/sw/inc/dcontact.hxx b/sw/inc/dcontact.hxx
index 36f2410321de..e7a34d129083 100644
--- a/sw/inc/dcontact.hxx
+++ b/sw/inc/dcontact.hxx
@@ -25,6 +25,7 @@
#include <fmtanchr.hxx>
#include <frmfmt.hxx>
#include <list>
+#include <memory>
#include "calbck.hxx"
#include <anchoreddrawobject.hxx>
@@ -189,7 +190,7 @@ public:
class SW_DLLPUBLIC SwFlyDrawContact final : public SwContact
{
private:
- SwFlyDrawObj* mpMasterObj;
+ std::unique_ptr<SwFlyDrawObj> mpMasterObj;
void SwClientNotify(const SwModify&, const SfxHint& rHint) override;