Skip to content

Commit

Permalink
fix(font): the ids pointer is not freed
Browse files Browse the repository at this point in the history
  • Loading branch information
lc-soft committed Oct 28, 2018
1 parent 145d9ee commit e56d3e4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/font/fontlibrary.c
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ static struct LCUI_FontLibraryModule {

/* clang-format on */

#define FontBitmap_IsValid(fbmp) (fbmp && fbmp->width > 0 && fbmp->rows > 0)
#define FontBitmap_IsValid(fbmp) ((fbmp) && (fbmp)->width > 0 && (fbmp)->rows > 0)
#define SelectChar(ch) (RBTree *)RBTree_GetData(&fontlib.bitmap_cache, ch)
#define SelectFont(ch, font_id) (RBTree *)RBTree_GetData(ch, font_id)
#define SelectBitmap(font, size) (LCUI_FontBitmap *)RBTree_GetData(font, size)
Expand Down Expand Up @@ -919,6 +919,7 @@ static void LCUIFont_LoadFontsForWindows(void)
if (i > 0) {
LCUIFont_SetDefault(ids[i - 1]);
}
free(ids);
}

#else
Expand Down

0 comments on commit e56d3e4

Please sign in to comment.