[MPlayer-dev-eng] [PATCH] Fix fontconfig crash when it can't find a config directory

Adrian Stutz adrian at sttz.ch
Wed Dec 16 12:14:09 CET 2009


On Wed, Dec 16, 2009 at 12:39 AM, Diego Biurrun <diego at biurrun.de> wrote:

> On Tue, Dec 15, 2009 at 08:43:03PM +0100, Adrian Stutz wrote:
> > FcFontMatch in font_load_ft.c expects its third argument to be a pointer
> and
> > tries to assign it a result value when an error occurs. Current code
> passes
> > 0 to the function, which leads to a crash if no font can be matched. This
> is
> > the case if no fontconfig config directory (and therefore no fonts) can
> be
> > found on the system.
> >
> > This patch passes a proper pointer to the function, checks if it fails
> and
> > falls back to the non-fontconfig behavior in that case.
>
> Sounds good.  Commit if it works, which I assume it does...
>
> Diego
>

Applied.

I've tested on OSX with and without a config directory.

Thanks
Adrian



More information about the MPlayer-dev-eng mailing list