LCL: TGraphicControl: always call FreeHandle - HandleAllocated doesn't take FDeviceContext into consideration. Issue #30003, patch by Michl

git-svn-id: trunk@53253 -
This commit is contained in:
ondrej 2016-10-28 19:01:02 +00:00
parent d0383990ca
commit 643cbe0475

View File

@ -94,15 +94,13 @@ procedure TGraphicControl.DoOnChangeBounds;
begin
inherited DoOnChangeBounds;
// reset canvas handle in next access
if Canvas.HandleAllocated then
TControlCanvas(Canvas).FreeHandle;
TControlCanvas(Canvas).FreeHandle;
end;
procedure TGraphicControl.DoOnParentHandleDestruction;
begin
inherited;
if Canvas.HandleAllocated then
TControlCanvas(Canvas).FreeHandle;
TControlCanvas(Canvas).FreeHandle;
end;
procedure TGraphicControl.CMCursorChanged(var Message: TLMessage);