Potential access violation after node creation
Posted: Mon Jul 14, 2014 11:48 am
In the TTree component of TeeChart 2014 of May,1 2, 2014, creating a node might result in an access violation in method TCanvas3D.AssignFont3D of unit TeCanvas.pas.
The reason is that method TCanvas3D.AssignFont3D misses a check whether the member View3DOptions is actually assigned. The following replacement for the method fixes the problem:
The reason is that method TCanvas3D.AssignFont3D misses a check whether the member View3DOptions is actually assigned. The following replacement for the method fixes the problem:
Code: Select all
procedure TCanvas3D.AssignFont3D(const AFont:TTeeFont);
begin
if (not Supports3DText) and
Assigned(View3DOptions) and
(View3DOptions.ZoomText<>ztNo) and (View3DOptions.ZoomFloat<>100) then
AssignFontSize(AFont,AFont.SizeFloat*0.01*View3DOptions.ZoomFloat)
else
AssignFont(AFont);
end;