Commit f0f1b6ae15d9f2c9c0dce7325d362c13c15878db

David Turner 2002-07-08T23:05:14

* src/base/ftglyph.c (FT_Glyph_To_Bitmap): added code to return succesfully when the function is called with a bitmap glyph (the previous code simply returned with an error)

diff --git a/ChangeLog b/ChangeLog
index 514adbe..68360ec 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2002-07-07  David Turner  <david@freetype.org>
 
+    * src/base/ftglyph.c (FT_Glyph_To_Bitmap): added code to return succesfully
+    when the function is called with a bitmap glyph (the previous code simply
+    returned with an error)
+
     * docs/DEBUG.TXT: adding debugging support documentation
 
     * src/base/ftdebug.c (ft_debug_init), builds/win32/ftdebug.c
diff --git a/src/base/ftglyph.c b/src/base/ftglyph.c
index 1f0989f..e6bb330 100644
--- a/src/base/ftglyph.c
+++ b/src/base/ftglyph.c
@@ -591,6 +591,11 @@
       goto Bad;
 
     clazz = glyph->clazz;
+
+    /* when called with a bitmap glyph, do nothing and return succesfully */
+    if ( clazz == &ft_bitmap_glyph_class )
+      goto Exit;
+
     if ( !clazz || !clazz->glyph_prepare )
       goto Bad;