mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-24 20:49:16 +02:00
* Fix bug ID #24099 (make sure self is not destroyed while disconnecting sink)
git-svn-id: trunk@36771 -
This commit is contained in:
parent
4e494607d6
commit
aa5b2ff6fb
@ -169,9 +169,11 @@ procedure TAbstractEventSink.Disconnect;
|
|||||||
begin
|
begin
|
||||||
if Assigned(FDispatch) then begin
|
if Assigned(FDispatch) then begin
|
||||||
// Unhook the sink from the automation server
|
// Unhook the sink from the automation server
|
||||||
|
Self._addRef;
|
||||||
InterfaceDisconnect(FDispatch, FDispIntfIID, FConnection);
|
InterfaceDisconnect(FDispatch, FDispIntfIID, FConnection);
|
||||||
FDispatch := nil;
|
FDispatch := nil;
|
||||||
FConnection := 0;
|
FConnection := 0;
|
||||||
|
self._Release;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user