Commit 1c00c2e4 authored by Nils Philippsen's avatar Nils Philippsen

app: fix re-initializing fontconfig in gimp_fonts_reset()

Calling FcConfigSetCurrent() with NULL is just broken, it almost
immediately dereferences the passed pointer. Apparently this line
is executed seldom, otherwise we'd see way more crashes in this place.
Just use FcInitReinitialize() which exists for the very purpose of
reinitializing the fontconfig library.
parent 03044c5b
......@@ -116,10 +116,8 @@ gimp_fonts_reset (Gimp *gimp)
if (gimp->no_fonts)
/* We clear the default config here, so any subsequent fontconfig use will
* reinit the library with defaults. (Maybe we should call FcFini here too?)
FcConfigSetCurrent (NULL);
/* Reinit the library with defaults. */
FcInitReinitialize ();
static gboolean
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment