diff --git a/pcl/simple-streams/external-formats/utf-16.lisp b/pcl/simple-streams/external-formats/utf-16.lisp
index ed69a256fb42ee0e2ca64791902cea84dd49d5b6..5e15223d55806973e51db12bcbc0f9f19aba4197 100644
--- a/pcl/simple-streams/external-formats/utf-16.lisp
+++ b/pcl/simple-streams/external-formats/utf-16.lisp
@@ -1,7 +1,7 @@
 ;;; -*- Mode: LISP; Syntax: ANSI-Common-Lisp; Package: STREAM -*-
 ;;;
 ;;; **********************************************************************
-(ext:file-comment "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/pcl/simple-streams/external-formats/utf-16.lisp,v 1.12 2010/07/12 14:42:11 rtoy Exp $")
+(ext:file-comment "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/pcl/simple-streams/external-formats/utf-16.lisp,v 1.13 2010/08/13 01:48:44 rtoy Exp $")
 
 (in-package "STREAM")
 (intl:textdomain "cmucl")
@@ -126,13 +126,14 @@ Unicode replacement character.")
 	      (,output (ldb (byte 8 8) code))
 	      (,output (ldb (byte 8 0) code))))
        (let ((,c (car ,state)))
-	 (out (if (lisp::surrogatep ,c)
-		  (if ,error
-		      (funcall ,error
-			       "Flushing bare surrogate #x~4,'0X is illegal for UTF-16"
-			       (char-code ,c))
-		      +replacement-character-code+)
-		  ,c)))))
+	 (when ,c
+	   (out (if (lisp::surrogatep ,c)
+		    (if ,error
+			(funcall ,error
+				 "Flushing bare surrogate #x~4,'0X is illegal for UTF-16"
+				 (char-code ,c))
+			+replacement-character-code+)
+		    ,c))))))
   (copy-state (state)
     ;; The state is list. Copy it
     `(copy-list ,state)))