Browse Source

* Fix GetFulltext when unicodemap is nil

Michaël Van Canneyt 2 years ago
parent
commit
4e5eaaf52e
1 changed files with 3 additions and 0 deletions
  1. 3 0
      packages/fcl-pdf/src/fppdfobjects.pp

+ 3 - 0
packages/fcl-pdf/src/fppdfobjects.pp

@@ -1425,11 +1425,14 @@ Var
   i : integer;
   i : integer;
 
 
 begin
 begin
+  if aUnicodeMap=Nil then
+    Exit(GetFullText);
   Result:='';
   Result:='';
   if Length(Tokens)>=2 then
   if Length(Tokens)>=2 then
     For I:=1 to Length(Tokens)-2 do
     For I:=1 to Length(Tokens)-2 do
       begin
       begin
       if Tokens[I].TokenType=ptString then
       if Tokens[I].TokenType=ptString then
+
         Result:=Result+aUnicodeMap.InterPret(Tokens[I].TokenData)
         Result:=Result+aUnicodeMap.InterPret(Tokens[I].TokenData)
       else if Tokens[i].IsNumber then
       else if Tokens[i].IsNumber then
         begin
         begin