LCL: Do not try to access a method of nil AControl in class procedure TDockHeader.PerformMouseDown, fixes crashes in some cases. Issue #41675, hint by Hans vB.

This commit is contained in:
Maxim Ganetsky 2025-05-25 22:46:48 +03:00
parent 31a7b58b21
commit 38d47de87b

View File

@ -504,6 +504,8 @@ end;
class procedure TDockHeader.PerformMouseDown(AControl: TControl;
APart: TLazDockHeaderPart);
begin
if AControl=nil then
exit;
case APart of
ldhpAll, ldhpCaption:
// mouse down on not buttons => start drag