ref: b33b856a2753a1b4a23fdac658116883fd9bf7f1
parent: e8770c679bdee7da80ecb727a85aafec58da7ed5
author: Eugene A. Shatokhin <[email protected]>
date: Mon Jul 5 18:36:30 EDT 2010
Fix Savannah bug #27648. * src/base/ftobjs.c (ft_remove_renderer, FT_Add_Module): Call `raster_done' only if we have an outline glyph format. Fix comment typo.
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2010-07-05 Eugene A. Shatokhin <[email protected]>
+
+ Fix Savannah bug #27648.
+
+ * src/base/ftobjs.c (ft_remove_renderer, FT_Add_Module): Call
+ `raster_done' only if we have an outline glyph format.
+
2010-07-05 Werner Lemberg <[email protected]>
Fix Savannah bug #30030.
--- a/include/freetype/ftrender.h
+++ b/include/freetype/ftrender.h
@@ -4,7 +4,7 @@
/* */
/* FreeType renderer modules public interface (specification). */
/* */
-/* Copyright 1996-2001, 2005, 2006 by */
+/* Copyright 1996-2001, 2005, 2006, 2010 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -140,10 +140,6 @@
/* */
/* raster_class :: For @FT_GLYPH_FORMAT_OUTLINE renderers only. */
/* This is a pointer to its raster's class. */
- /* */
- /* raster :: For @FT_GLYPH_FORMAT_OUTLINE renderers only. */
- /* This is a pointer to the corresponding raster */
- /* object, if any. */
/* */
typedef struct FT_Renderer_Class_
{
--- a/src/base/ftobjs.c
+++ b/src/base/ftobjs.c
@@ -3739,7 +3739,7 @@
/* allocate raster object if needed */
if ( clazz->glyph_format == FT_GLYPH_FORMAT_OUTLINE &&
- clazz->raster_class->raster_new )
+ clazz->raster_class->raster_new )
{
error = clazz->raster_class->raster_new( memory, &render->raster );
if ( error )
@@ -3780,7 +3780,8 @@
/* release raster object, if any */
- if ( render->raster )
+ if ( render->clazz->glyph_format == FT_GLYPH_FORMAT_OUTLINE &&
+ render->raster )
render->clazz->raster_class->raster_done( render->raster );
/* remove from list */
@@ -4107,7 +4108,8 @@
FT_Renderer renderer = FT_RENDERER( module );
- if ( renderer->raster )
+ if ( renderer->clazz->glyph_format == FT_GLYPH_FORMAT_OUTLINE &&
+ renderer->raster )
renderer->clazz->raster_class->raster_done( renderer->raster );
}