Move generic destroy to later in the face and size destruction.
* src/base/ftobjs.c (destroy_size, destroy_face): This is such that the generic destroy can be used to call `FT_Done_Library`. For that to work, it needs to call it *after* having removed the face from the respective module.
This commit is contained in:
parent
f02bffad0f
commit
1394436633
@ -1253,14 +1253,14 @@
|
||||
FT_Driver driver = (FT_Driver)driver_;
|
||||
|
||||
|
||||
/* finalize client-specific data */
|
||||
if ( size->generic.finalizer )
|
||||
size->generic.finalizer( size );
|
||||
|
||||
/* finalize format-specific stuff */
|
||||
if ( driver->clazz->done_size )
|
||||
driver->clazz->done_size( size );
|
||||
|
||||
/* finalize client-specific data */
|
||||
if ( size->generic.finalizer )
|
||||
size->generic.finalizer( size );
|
||||
|
||||
FT_FREE( size->internal );
|
||||
FT_FREE( size );
|
||||
}
|
||||
@ -1322,10 +1322,6 @@
|
||||
driver );
|
||||
face->size = NULL;
|
||||
|
||||
/* now discard client data */
|
||||
if ( face->generic.finalizer )
|
||||
face->generic.finalizer( face );
|
||||
|
||||
/* discard charmaps */
|
||||
destroy_charmaps( face, memory );
|
||||
|
||||
@ -1340,6 +1336,10 @@
|
||||
|
||||
face->stream = NULL;
|
||||
|
||||
/* now discard client data */
|
||||
if ( face->generic.finalizer )
|
||||
face->generic.finalizer( face );
|
||||
|
||||
/* get rid of it */
|
||||
if ( face->internal )
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user