Kaydet (Commit) 94cd5204 authored tarafından Michael Meeks's avatar Michael Meeks

vcl: Control - hold a VclPtr instead of a dogtag over emission.

Change-Id: Ibedf2fc25ac141e10d07ba757fa6c76a4c4a6cff
üst f0bed251
...@@ -324,21 +324,18 @@ void Control::AppendLayoutData( const Control& rSubControl ) const ...@@ -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; VclPtr<Control> xThis(this);
ImplAddDel( &aCheckDelete );
CallEventListeners( nEvent ); CallEventListeners( nEvent );
if ( !aCheckDelete.IsDead() )
if ( !xThis->IsDisposed() )
{ {
rHandler.Call( pCaller ); rHandler.Call( pCaller );
if ( !aCheckDelete.IsDead() ) if ( !xThis->IsDisposed() )
{
ImplRemoveDel( &aCheckDelete );
return false; return false;
}
} }
return true; return true;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment