mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-08 19:38:09 +02:00
TAChart: Fix crash if a series refers to a non-existing chartstyle.
git-svn-id: trunk@64101 -
This commit is contained in:
parent
19c695f1d9
commit
2ebdf2a994
@ -1448,6 +1448,7 @@ var
|
||||
ps, saved_ps: TSeriesPointerStyle;
|
||||
brushAlreadySet: boolean;
|
||||
c: TColor;
|
||||
style: TChartStyle;
|
||||
begin
|
||||
Assert(Pointer <> nil, 'Series pointer');
|
||||
if (not Pointer.Visible) or (Length(FGraphPoints) = 0) then exit;
|
||||
@ -1465,7 +1466,12 @@ begin
|
||||
Pointer.SetOwner(nil); // avoid recursion
|
||||
Pointer.Style := ps;
|
||||
end;
|
||||
brushAlreadySet := (Styles <> nil) and Styles.StyleByIndex(AStyleIndex).UseBrush;
|
||||
brushAlreadySet := false;
|
||||
if (Styles <> nil) then
|
||||
begin
|
||||
style := Styles.StyleByIndex(AStyleIndex);
|
||||
if style <> nil then brushAlreadySet := style.UseBrush;
|
||||
end;
|
||||
if brushAlreadySet then
|
||||
Styles.Apply(ADrawer, AStyleIndex);
|
||||
if UseDataColors then c := Source[i]^.Color else c := clTAColor;
|
||||
|
Loading…
Reference in New Issue
Block a user