Skip to content

Commit

Permalink
dont check HandleAllocaced in UpdateWrapInfo
Browse files Browse the repository at this point in the history
  • Loading branch information
Alextp committed Mar 23, 2020
1 parent a78a8bc commit 7999615
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion atsynedit/atsynedit.pas
Original file line number Diff line number Diff line change
Expand Up @@ -1814,9 +1814,12 @@ procedure TATSynEdit.UpdateWrapInfo(AForceUpdate: boolean);
NLine, NIndexFrom, NIndexTo: integer;
i, j: integer;
begin
//must have, coz method can be called before 1st paint,
{
//2020.03: works ok w/o this block
//old comment: method can be called before 1st paint,
//so TCanvas.TextWidth will give exception (control has no parent window)
if not HandleAllocated then exit;
}

//must init FRect* if called before first paint (wrapped items need it)
if FRectMain.Width=0 then
Expand Down

0 comments on commit 7999615

Please sign in to comment.