freetype
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ft] FT_Done_Face Should Not Return An Error


From: Werner LEMBERG
Subject: Re: [ft] FT_Done_Face Should Not Return An Error
Date: Mon, 07 May 2018 07:33:16 +0200 (CEST)

>> You only get an error code if `FT_Done_Face' is called with an
>> invalid handle, something which doesn't happen in a normal FreeType
>> workflow.
> 
> What are you supposed to do when it does happen?

You would only check the return value of `FT_Done_Face' if your code
gets an `FT_Face' handle that it doesn't manage by itself (rather
unlikely, but who knows).  In this situation it could happen that the
handle is NULL, and this should be reported back – not because
`FT_Done_Face' can't handle value NULL but the fact that it has
received such a handle, which indicates a problem in the calling
program.

For all other cases `FT_Done_Face' can't do any additional harm, so
you can safely ignore its return value (similar to `free').


    Werner

reply via email to

[Prev in Thread] Current Thread [Next in Thread]