summaryrefslogtreecommitdiff
path: root/sd/source/ui/slideshow
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-06-20 15:56:35 +0200
committerNoel Grandin <noelgrandin@gmail.com>2016-06-23 06:28:00 +0000
commitaa0d0536a444fb26d9e570bd6bf6c1bdc3596cf3 (patch)
tree8b2a5207e77fa4054a37b33c25378c23a00af8ed /sd/source/ui/slideshow
parentb722f3d6fc72877e8caaaae7291d5d736ddc494d (diff)
tdf#97527 - vcl: reference-count Menu
some places are marked with "dodgy"- need to check those to see what is going on, because they are leaving dangling pointers behind in the Menu class Change-Id: I41d5c7c0fec2f70ce9e3ffdc48cd03d26c0a869b Reviewed-on: https://gerrit.libreoffice.org/26516 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'sd/source/ui/slideshow')
-rw-r--r--sd/source/ui/slideshow/slideshowimpl.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/sd/source/ui/slideshow/slideshowimpl.cxx b/sd/source/ui/slideshow/slideshowimpl.cxx
index 2b031ea59b95..ade2ef6f918a 100644
--- a/sd/source/ui/slideshow/slideshowimpl.cxx
+++ b/sd/source/ui/slideshow/slideshowimpl.cxx
@@ -1985,7 +1985,7 @@ IMPL_LINK_NOARG_TYPED(SlideshowImpl, ContextMenuHdl, void*, void)
if( !mbWasPaused )
pause();
- PopupMenu* pMenu = new PopupMenu( SdResId( RID_SLIDESHOW_CONTEXTMENU ) );
+ VclPtrInstance<PopupMenu> pMenu( SdResId( RID_SLIDESHOW_CONTEXTMENU ) );
// Adding button to display if in Pen mode
pMenu->CheckItem( CM_PEN_MODE, mbUsePen);
@@ -2098,7 +2098,7 @@ IMPL_LINK_NOARG_TYPED(SlideshowImpl, ContextMenuHdl, void*, void)
pMenu->SetSelectHdl( LINK( this, SlideshowImpl, ContextMenuSelectHdl ) );
pMenu->Execute( mpShowWindow, maPopupMousePos );
- delete pMenu;
+ pMenu.disposeAndClear();
if( mxView.is() )
mxView->ignoreNextMouseReleased();