only close the image if was opened to begin with

This commit is contained in:
james 2005-01-21 17:01:43 +00:00
parent dfa1d438e7
commit f4bc5ad4c3

View File

@ -306,7 +306,11 @@ class lpdf
function output()
{
pdf_end_page($this->pdf);
pdf_close_image($this->pdf,$this->logoimage);
//only close the image if it was opened to begin with
if($this->logoimage)
pdf_close_image($this->pdf,$this->logoimage);
pdf_close($this->pdf);
$pdfdata=pdf_get_buffer($this->pdf);
header("Content-type: application/pdf");