Browse Source

* Fix case where table streams are nil

git-svn-id: trunk@43355 -
michael 5 years ago
parent
commit
51b1f6a47c
1 changed files with 5 additions and 2 deletions
  1. 5 2
      packages/fcl-pdf/src/fpttfsubsetter.pp

+ 5 - 2
packages/fcl-pdf/src/fpttfsubsetter.pp

@@ -676,19 +676,22 @@ end;
 function TFontSubsetter.buildFpgmTable: TStream;
 begin
   Result := GetRawTable('fpgm');
-  Result.Position := 0;
+  if Assigned(Result) then
+    Result.Position := 0;
 end;
 
 function TFontSubsetter.buildPrepTable: TStream;
 begin
   Result := GetRawTable('prep');
+  if Assigned(Result) then
   Result.Position := 0;
 end;
 
 function TFontSubsetter.buildCvtTable: TStream;
 begin
   Result := GetRawTable('cvt ');
-  Result.Position := 0;
+  if Assigned(Result) then
+    Result.Position := 0;
 end;
 
 function TFontSubsetter.buildGlyfTable(var newOffsets: TArrayUInt32): TStream;