Potential access violation after node creation

TeeTree VCL for Borland Delphi and C++ Builder.
Post Reply
Collinor
Newbie
Newbie
Posts: 12
Joined: Wed Oct 16, 2013 12:00 am

Potential access violation after node creation

Post by Collinor » 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:

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;

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Re: Potential access violation after node creation

Post by Narcís » Wed Jul 16, 2014 10:46 am

Hi Collinor,

Thank you very much for your suggestion. It has been implemented in our sources for the next maintenance release.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Post Reply