diff options
Diffstat (limited to 'svx/source/svdraw/sdrmasterpagedescriptor.cxx')
-rw-r--r-- | svx/source/svdraw/sdrmasterpagedescriptor.cxx | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/svx/source/svdraw/sdrmasterpagedescriptor.cxx b/svx/source/svdraw/sdrmasterpagedescriptor.cxx index 3bc645fb4dc7..89f042c087e0 100644 --- a/svx/source/svdraw/sdrmasterpagedescriptor.cxx +++ b/svx/source/svdraw/sdrmasterpagedescriptor.cxx @@ -45,11 +45,7 @@ namespace sdr // de-register at used page maUsedPage.RemovePageUser(*this); - if(mpViewContact) - { - delete mpViewContact; - mpViewContact = nullptr; - } + mpViewContact.reset(); } // ViewContact part @@ -57,8 +53,8 @@ namespace sdr { if(!mpViewContact) { - const_cast< MasterPageDescriptor* >(this)->mpViewContact = - new sdr::contact::ViewContactOfMasterPageDescriptor(*const_cast< MasterPageDescriptor* >(this)); + mpViewContact.reset( + new sdr::contact::ViewContactOfMasterPageDescriptor(*const_cast< MasterPageDescriptor* >(this)) ); } return *mpViewContact; |