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.
This commit is contained in:
Eugene A. Shatokhin 2010-07-05 22:36:30 +02:00 committed by Werner Lemberg
parent e8770c679b
commit b33b856a27
3 changed files with 13 additions and 8 deletions

View File

@ -1,3 +1,10 @@
2010-07-05 Eugene A. Shatokhin <spectre@ispras.ru>
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 <wl@gnu.org>
Fix Savannah bug #30030.

View File

@ -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, */
@ -141,10 +141,6 @@ FT_BEGIN_HEADER
/* 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_
{
FT_Module_Class root;

View File

@ -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 );
}