diff --git a/libnx/nxfonts/nxfonts_cache.c b/libnx/nxfonts/nxfonts_cache.c index b74df1e0f2..0247c5f46c 100644 --- a/libnx/nxfonts/nxfonts_cache.c +++ b/libnx/nxfonts/nxfonts_cache.c @@ -673,11 +673,12 @@ FCACHE nxf_cache_connect(enum nx_fontid_e fontid, /* Initialize the font cache */ - priv->maxglyphs = maxglyphs; priv->fontid = fontid; + priv->fclients = 1; + priv->maxglyphs = maxglyphs; + priv->bpp = bpp; priv->fgcolor = fgcolor; priv->bgcolor = bgcolor; - priv->bpp = bpp; /* Select the rendering function */ @@ -758,6 +759,10 @@ FCACHE nxf_cache_connect(enum nx_fontid_e fontid, { priv->maxglyphs = maxglyphs; } + + /* Increment the number of clients of the font cache */ + + priv->fclients++; } nxf_list_unlock();