Bad RTF table causing RichView to error

General TRichView support forum. Please post your questions here
Post Reply
jgkoehn
Posts: 311
Joined: Thu Feb 20, 2020 9:32 pm

Bad RTF table causing RichView to error

Post by jgkoehn »

Greetings Sergey,

I am getting an error in this code:
First chance exception at $75D50144. Exception class EListError with message 'List index out of bounds (-1). TRVList is empty'.
I know it is bad RTF code on a Table (however, I can't always fix the bad RTF tables. These can be from users. Is there a way to handle this more robustly?)

Current code in RV22.2

Code: Select all

function TRVRTFReader.DoTable(WhatHappens: TRVRTFTableEventKind): Boolean;
begin
  Result := True;
  UpdateMarker;
  if Assigned(FOnTable) then
    FOnTable(Self, WhatHappens, Result);
  AfterTableRow := WhatHappens in [rvf_tbl_RowEnd, rvf_tbl_TableEnd,
    rvf_tbl_TableForcedEnd];
end;
Ideas?
Post Reply