Commit 6c1a7ae7 authored by blikblum's avatar blikblum
Browse files

lcl: check for csDestroyingHandle in TControl.HandleObjectShouldBeVisible. Fix issue #19882

git-svn-id: trunk@36758 -
parent ec03b534
......@@ -4294,7 +4294,7 @@ end;
------------------------------------------------------------------------------}
function TControl.HandleObjectShouldBeVisible: boolean;
begin
Result := (not (csDestroying in ComponentState)) and IsControlVisible;
Result := not ((csDestroying in ComponentState) or (csDestroyingHandle in FControlState)) and IsControlVisible;
if Result and Assigned(Parent) then
Result := Parent.HandleObjectShouldBeVisible;
//DebugLn(['TControl.HandleObjectShouldBeVisible ',DbgSName(Self),' ',Result]);
......
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