460672
diff --git a/tools/tiff2pdf.c b/tools/tiff2pdf.c
460672
index 92a1a3d..26a1acb 100644
460672
--- a/tools/tiff2pdf.c
460672
+++ b/tools/tiff2pdf.c
460672
@@ -2462,6 +2462,7 @@ tsize_t t2p_readwrite_pdf_image(T2P* t2p, TIFF* input, TIFF* output){
460672
 					TIFFFileName(input));
460672
 				t2p->t2p_error = T2P_ERR_ERROR;
460672
 			  _TIFFfree(buffer);
460672
+                return(0);
460672
 			} else {
460672
 				buffer=samplebuffer;
460672
 				t2p->tiff_datasize *= t2p->tiff_samplesperpixel;