diff options
author | Akira Kakuto <kakuto@fuk.kindai.ac.jp> | 2015-11-19 08:54:12 +0000 |
---|---|---|
committer | Akira Kakuto <kakuto@fuk.kindai.ac.jp> | 2015-11-19 08:54:12 +0000 |
commit | 52b5b5df295683036612072db256172356408bf9 (patch) | |
tree | 3fc5880fb6f2f3e5c4766de07bbf49a3ad436d4c /Build/source/texk/web2c/luatexdir/image | |
parent | 7d7d83c1fc206269893ebf5fae3977a7148ebb3e (diff) |
web2c/luatexdir: Sync with the upstream.
git-svn-id: svn://tug.org/texlive/trunk@38892 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/web2c/luatexdir/image')
-rw-r--r-- | Build/source/texk/web2c/luatexdir/image/pdftoepdf.w | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/Build/source/texk/web2c/luatexdir/image/pdftoepdf.w b/Build/source/texk/web2c/luatexdir/image/pdftoepdf.w index caa510497ba..1ece3a2dd48 100644 --- a/Build/source/texk/web2c/luatexdir/image/pdftoepdf.w +++ b/Build/source/texk/web2c/luatexdir/image/pdftoepdf.w @@ -966,8 +966,14 @@ static void destroyPdfDocument(void *pa, void * /*pb */ ) void unrefPdfDocument(char *file_path) { PdfDocument *pdf_doc = findPdfDocument(file_path); - assert(pdf_doc != NULL); - assert(pdf_doc->occurences != 0); // aim for point landing + if (pdf_doc == NULL) /* Does the caller break the contract ? */ +return; + if (pdf_doc->occurences == 0) /* Again, does the caller breaks the contract ? */ +return; + /* for the moment we keep these assert here as remind that the code */ + /* should be revisited */ + //assert(pdf_doc != NULL); + //assert(pdf_doc->occurences != 0); // aim for point landing pdf_doc->occurences--; #ifdef DEBUG fprintf(stderr, "\nDEBUG: Decrementing %s (%d)\n", |