CalLite: Avoid crash when Colors are shared (Issue )

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@9592 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
wp_xxyyzz 2025-01-18 10:42:00 +00:00
parent cae258705a
commit a95ac46c9d

View File

@ -1463,7 +1463,9 @@ procedure TCalColors.SetColor(AIndex: Integer; AValue: TColor);
begin
if FColors[AIndex] = AValue then exit;
FColors[AIndex] := AValue;
FOwner.Draw;
// FOwner can be nil, if Colors are shared (Issue #39097)
if FOwner <> nil then
FOwner.Draw;
end;