CalLite: Avoid crash when Colors are shared (Issue #39097)
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@9592 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
parent
cae258705a
commit
a95ac46c9d
@ -1463,6 +1463,8 @@ procedure TCalColors.SetColor(AIndex: Integer; AValue: TColor);
|
|||||||
begin
|
begin
|
||||||
if FColors[AIndex] = AValue then exit;
|
if FColors[AIndex] = AValue then exit;
|
||||||
FColors[AIndex] := AValue;
|
FColors[AIndex] := AValue;
|
||||||
|
// FOwner can be nil, if Colors are shared (Issue #39097)
|
||||||
|
if FOwner <> nil then
|
||||||
FOwner.Draw;
|
FOwner.Draw;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user