mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-22 13:59:31 +02:00
LCL: Windows, protect wincontrol via Inc/DecLclRefCount while in DoWindProc / see issue #0028404 / see rev 63507 #d031209b99
git-svn-id: trunk@63529 -
This commit is contained in:
parent
1ef7418a6d
commit
4fd90b6fad
@ -528,13 +528,17 @@ end;
|
||||
procedure TWindowProcHelper.SetlWinControl(AValue: TWinControl);
|
||||
begin
|
||||
if FlWinControl = AValue then Exit;
|
||||
if FlWinControl <> nil then
|
||||
if FlWinControl <> nil then begin
|
||||
FlWinControl.DecLCLRefCount;
|
||||
FlWinControl.RemoveHandlerOnBeforeDestruction(@TWindProcNotificationReceiver(@Self).ReceiveDestroyNotify);
|
||||
end;
|
||||
|
||||
FlWinControl := AValue;
|
||||
|
||||
if FlWinControl <> nil then
|
||||
if FlWinControl <> nil then begin
|
||||
FlWinControl.AddHandlerOnBeforeDestruction(@TWindProcNotificationReceiver(@Self).ReceiveDestroyNotify);
|
||||
FlWinControl.IncLCLRefCount;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TWindowProcHelper.CalcClipRgn(PaintRegion: HRGN);
|
||||
|
Loading…
Reference in New Issue
Block a user