From 962d892041da5c8a2d4ab9329f4b0dbb471b4917 Mon Sep 17 00:00:00 2001 From: kramm Date: Mon, 28 Jun 2004 12:37:37 +0000 Subject: [PATCH] added some error checks. --- pdf2swf/swfoutput.cc | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/pdf2swf/swfoutput.cc b/pdf2swf/swfoutput.cc index 0da570b..5e5e4da 100644 --- a/pdf2swf/swfoutput.cc +++ b/pdf2swf/swfoutput.cc @@ -996,13 +996,18 @@ SWFFont::SWFFont(char*name, int id, char*filename) int t, outlinepos=0; char*map[256]; + char*null = 0; + if(!a) + a=&null; + t=0; while(a[t]) t++; this->charnum = t; - if(!charnum) - return; + if(!charnum) { + this->standardtablesize = 0; + } msg(" Font %s(%d): Storing %d outlines.\n", FIXNULL(name), id, charnum); this->standardtablesize = 256; @@ -1166,7 +1171,8 @@ SWFFont::~SWFFont() } free(ptr); - free(outline); + if(outline) + free(outline); for(t=0;t