SynEdit: Fixed crash due to uninitialised pointer. ATokenInfo.Tk.TokenStart may be trash, but the caller needs nil if there is no data.

(cherry picked from commit 05a5c1f416)
This commit is contained in:
Martin 2025-04-21 21:22:38 +02:00
parent b94f2d82e8
commit 7f2d12f0f3

View File

@ -743,6 +743,7 @@ var
TabExtra: Integer;
HasTabs, HasDouble: Boolean;
begin
ATokenInfo := Default(TLazSynDisplayTokenInfoEx);
ATokenInfo.Attr := nil;
while True do begin
Result := MaybeFetchToken; // Get token from View/Highlighter