diff options
-rw-r--r-- | include/svx/sdr/contact/viewobjectcontactofpageobj.hxx | 3 | ||||
-rw-r--r-- | svx/source/sdr/contact/viewobjectcontactofpageobj.cxx | 4 |
2 files changed, 3 insertions, 4 deletions
diff --git a/include/svx/sdr/contact/viewobjectcontactofpageobj.hxx b/include/svx/sdr/contact/viewobjectcontactofpageobj.hxx index e9b115ee4e2e..ace62f1941c0 100644 --- a/include/svx/sdr/contact/viewobjectcontactofpageobj.hxx +++ b/include/svx/sdr/contact/viewobjectcontactofpageobj.hxx @@ -21,6 +21,7 @@ #define INCLUDED_SVX_SDR_CONTACT_VIEWOBJECTCONTACTOFPAGEOBJ_HXX #include <svx/sdr/contact/viewobjectcontactofsdrobj.hxx> +#include <memory> class SdrPage; @@ -32,7 +33,7 @@ class SVX_DLLPUBLIC ViewObjectContactOfPageObj : public ViewObjectContactOfSdrOb { private: // the page painter helper - PagePrimitiveExtractor* mpExtractor; + std::unique_ptr<PagePrimitiveExtractor> mpExtractor; protected: // This method is responsible for creating the graphical visualisation data which is diff --git a/svx/source/sdr/contact/viewobjectcontactofpageobj.cxx b/svx/source/sdr/contact/viewobjectcontactofpageobj.cxx index db64344e0447..e22cbc184891 100644 --- a/svx/source/sdr/contact/viewobjectcontactofpageobj.cxx +++ b/svx/source/sdr/contact/viewobjectcontactofpageobj.cxx @@ -313,13 +313,11 @@ ViewObjectContactOfPageObj::~ViewObjectContactOfPageObj() { // remember candidate and reset own pointer to avoid action when createPrimitive2DSequence() // would be called for any reason - PagePrimitiveExtractor* pCandidate = mpExtractor; - mpExtractor = nullptr; + std::unique_ptr<PagePrimitiveExtractor> pCandidate = std::move(mpExtractor); // also reset the StartPage to avoid ActionChanged() forwardings in the // PagePrimitiveExtractor::InvalidatePartOfView() implementation pCandidate->SetStartPage(nullptr); - delete pCandidate; } } |