vcl/source/control/ctrl.cxx | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-)
New commits: commit 94cd5204e302950038278f3828a2d98c51361167 Author: Michael Meeks <michael.me...@collabora.com> Date: Fri May 8 12:20:18 2015 +0100 vcl: Control - hold a VclPtr instead of a dogtag over emission. Change-Id: Ibedf2fc25ac141e10d07ba757fa6c76a4c4a6cff diff --git a/vcl/source/control/ctrl.cxx b/vcl/source/control/ctrl.cxx index af9b3d4..34c4248 100644 --- a/vcl/source/control/ctrl.cxx +++ b/vcl/source/control/ctrl.cxx @@ -324,21 +324,18 @@ void Control::AppendLayoutData( const Control& rSubControl ) const } } -bool Control::ImplCallEventListenersAndHandler( sal_uLong nEvent, const Link<>& rHandler, void* pCaller ) +bool Control::ImplCallEventListenersAndHandler( sal_uLong nEvent, const Link<>& rHandler, void* pCaller ) { - ImplDelData aCheckDelete; - ImplAddDel( &aCheckDelete ); + VclPtr<Control> xThis(this); CallEventListeners( nEvent ); - if ( !aCheckDelete.IsDead() ) + + if ( !xThis->IsDisposed() ) { rHandler.Call( pCaller ); - if ( !aCheckDelete.IsDead() ) - { - ImplRemoveDel( &aCheckDelete ); + if ( !xThis->IsDisposed() ) return false; - } } return true; } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits