Font cache: Fix a reference counting issue: count not be initialized when font cache created.
This commit is contained in:
parent
256a66be02
commit
b3a6467193
@ -673,11 +673,12 @@ FCACHE nxf_cache_connect(enum nx_fontid_e fontid,
|
|||||||
|
|
||||||
/* Initialize the font cache */
|
/* Initialize the font cache */
|
||||||
|
|
||||||
priv->maxglyphs = maxglyphs;
|
|
||||||
priv->fontid = fontid;
|
priv->fontid = fontid;
|
||||||
|
priv->fclients = 1;
|
||||||
|
priv->maxglyphs = maxglyphs;
|
||||||
|
priv->bpp = bpp;
|
||||||
priv->fgcolor = fgcolor;
|
priv->fgcolor = fgcolor;
|
||||||
priv->bgcolor = bgcolor;
|
priv->bgcolor = bgcolor;
|
||||||
priv->bpp = bpp;
|
|
||||||
|
|
||||||
/* Select the rendering function */
|
/* Select the rendering function */
|
||||||
|
|
||||||
@ -758,6 +759,10 @@ FCACHE nxf_cache_connect(enum nx_fontid_e fontid,
|
|||||||
{
|
{
|
||||||
priv->maxglyphs = maxglyphs;
|
priv->maxglyphs = maxglyphs;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Increment the number of clients of the font cache */
|
||||||
|
|
||||||
|
priv->fclients++;
|
||||||
}
|
}
|
||||||
|
|
||||||
nxf_list_unlock();
|
nxf_list_unlock();
|
||||||
|
Loading…
Reference in New Issue
Block a user