~mcf/mupdf

d0b9c2be091749dbed2299e9186f632bfd048ce7 — Robin Watts 10 months ago 2536d12
Coverity 216668: Avoid null deref.

Probably never happens in practise as we don't go looking for objects
that don't exist, but this is safer.
1 files changed, 2 insertions(+), 0 deletions(-)

M source/pdf/pdf-xref.c
M source/pdf/pdf-xref.c => source/pdf/pdf-xref.c +2 -0
@@ 662,6 662,8 @@ void pdf_xref_ensure_local_object(fz_context *ctx, pdf_document *doc, int num)
			break;
	}
	/* sub == NULL implies we did not find it */
	if (sub == NULL)
		return; /* No object to find */

	/* Copy the object to the local section */
	doc->xref_index[num] = 0;