$NetBSD: patch-aa,v 1.2 2004/02/07 04:59:43 minskim Exp $

--- src/type0.c.orig	2002-12-30 00:12:42.000000000 -0600
+++ src/type0.c
@@ -102,7 +102,7 @@ static void load_tounicode_cmap_identity
   MFCLOSE (fp);
 
   stream = pdf_new_stream(STREAM_COMPRESS);
-  tounicode_cmap_identity = pdf_link_obj(pdf_ref_obj(stream));
+  tounicode_cmap_identity = pdf_ref_obj(stream);
 
   pdf_add_dict(pdf_stream_dict(stream),
 	       pdf_new_name("Length"), pdf_new_number(length));
@@ -398,7 +398,7 @@ int type0_font (const char *map_name, in
     if (tounicode_cmap_identity == NULL)
       load_tounicode_cmap_identity();
     pdf_add_dict (font_resource, pdf_new_name("ToUnicode"),
-		  tounicode_cmap_identity);
+		  pdf_link_obj(tounicode_cmap_identity));
   }
 
   /* finaly write Encoding */
