mirror of https://github.com/freetype/freetype
* src/base/ftglyph.c (FT_Get_Glyph): Set `*aglyph` to NULL in case of error.
This commit is contained in:
parent
a3749a64cd
commit
2af6903b15
|
@ -355,7 +355,7 @@ FT_BEGIN_HEADER
|
|||
*
|
||||
* @output:
|
||||
* aglyph ::
|
||||
* A handle to the glyph object.
|
||||
* A handle to the glyph object. `NULL` in case of error.
|
||||
*
|
||||
* @return:
|
||||
* FreeType error code. 0~means success.
|
||||
|
@ -385,7 +385,7 @@ FT_BEGIN_HEADER
|
|||
*
|
||||
* @output:
|
||||
* target ::
|
||||
* A handle to the target glyph object. 0~in case of error.
|
||||
* A handle to the target glyph object. `NULL` in case of error.
|
||||
*
|
||||
* @return:
|
||||
* FreeType error code. 0~means success.
|
||||
|
@ -671,7 +671,7 @@ FT_BEGIN_HEADER
|
|||
*
|
||||
* @input:
|
||||
* glyph ::
|
||||
* A handle to the target glyph object.
|
||||
* A handle to the target glyph object. Can be `NULL`.
|
||||
*/
|
||||
FT_EXPORT( void )
|
||||
FT_Done_Glyph( FT_Glyph glyph );
|
||||
|
|
|
@ -682,7 +682,10 @@
|
|||
Exit2:
|
||||
/* if an error occurred, destroy the glyph */
|
||||
if ( error )
|
||||
{
|
||||
FT_Done_Glyph( glyph );
|
||||
*aglyph = NULL;
|
||||
}
|
||||
else
|
||||
*aglyph = glyph;
|
||||
|
||||
|
|
Loading…
Reference in New Issue