Commit e97cb9127dbc8a10d07209aee679a0717346f1f6

Just van Rossum 2000-07-28T03:13:31

FT_Done_Stream(): do stream->close = 0 after calling stream->close(); this makes it safe to call FT_Done_Stream() more than once. David: please review this; I hope you agree with this minor change.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
diff --git a/src/base/ftobjs.c b/src/base/ftobjs.c
index 903856b..85b755c 100644
--- a/src/base/ftobjs.c
+++ b/src/base/ftobjs.c
@@ -297,7 +297,10 @@
   FT_EXPORT_FUNC( void )  FT_Done_Stream( FT_Stream  stream )
   {
     if ( stream && stream->close )
+    {
       stream->close( stream );
+      stream->close = 0;
+    }
   }