shithub: pdffs

Download patch

ref: 02fc81c3d68b45a6901de9032e61cb91f33b033c
parent: d613b76a67a6dbb4d2c16a17e6994e7bdf2731df
author: Sigrid Haflínudóttir <ftrvxmtrx@gmail.com>
date: Mon Aug 31 07:50:28 EDT 2020

pdfeval: handle nil case better

--- a/eval.c
+++ b/eval.c
@@ -10,8 +10,12 @@
 	Xref *x;
 	int i;
 
-	if(oo == nil || *oo == nil)
+	if(oo == nil)
 		return &null;
+	if(*oo == nil){
+		*oo = &null;
+		return &null;
+	}
 	o = *oo;
 	if(o->type != Oindir)
 		return o;