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,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;
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user