Skip to content

Commit be1fa5f

Browse files
committed
Address 4043
When duplicating a page without /Contents objects, make sure to detect this situation.
1 parent bca7436 commit be1fa5f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4373,7 +4373,7 @@ def fullcopy_page(self, pno, to=-1):
43734373
res = JM_read_contents( page1)
43744374

43754375
# create new /Contents object for page2
4376-
if res.m_internal:
4376+
if res and res.m_internal:
43774377
#contents = mupdf.pdf_add_stream( pdf, mupdf.fz_new_buffer_from_copied_data( b" ", 1), NULL, 0)
43784378
contents = mupdf.pdf_add_stream( pdf, mupdf.fz_new_buffer_from_copied_data( b" "), mupdf.PdfObj(), 0)
43794379
JM_update_stream( pdf, contents, res, 1)

0 commit comments

Comments
 (0)