text: font: pango/freetype2: fix correctly freeing font faces
Whoops, obvious typo. We need to free the face if the refcount drops to zero and not if it is non-zero. Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
This commit is contained in:
parent
21092ba70f
commit
d9e7137861
@ -519,7 +519,7 @@ static void manager_put_face(struct face *face)
|
||||
{
|
||||
manager_lock();
|
||||
|
||||
if (--face->ref) {
|
||||
if (!--face->ref) {
|
||||
kmscon_dlist_unlink(&face->list);
|
||||
kmscon_hashtable_free(face->glyphs);
|
||||
pthread_mutex_destroy(&face->glyph_lock);
|
||||
|
@ -343,7 +343,7 @@ static void manager_put_face(struct face *face)
|
||||
{
|
||||
manager_lock();
|
||||
|
||||
if (--face->ref) {
|
||||
if (!--face->ref) {
|
||||
kmscon_dlist_unlink(&face->list);
|
||||
kmscon_hashtable_free(face->glyphs);
|
||||
pthread_mutex_destroy(&face->glyph_lock);
|
||||
|
Loading…
x
Reference in New Issue
Block a user