From: kramm Date: Sun, 19 May 2002 11:25:00 +0000 (+0000) Subject: fix segfault in case of unimplemented function type. X-Git-Tag: xpdf-0-92~5 X-Git-Url: http://git.asbjorn.biz/?p=swftools.git;a=commitdiff_plain;h=fe0b15f5d5c1045fd82cf372cb40a1f3fed8f876 fix segfault in case of unimplemented function type. --- diff --git a/pdf2swf/xpdf/GfxState.cc b/pdf2swf/xpdf/GfxState.cc index 1abf9a5..b7afdae 100644 --- a/pdf2swf/xpdf/GfxState.cc +++ b/pdf2swf/xpdf/GfxState.cc @@ -912,14 +912,15 @@ GfxColorSpace *GfxSeparationColorSpace::parse(Array *arr) { obj1.free(); func = Function::parse(arr->get(3, &obj1)); obj1.free(); - if (!func->isOk()) { + if (!func || !func->isOk()) { goto err4; } cs = new GfxSeparationColorSpace(name, alt, func); return cs; err4: - delete func; + if(func) + delete func; delete alt; err3: delete name;