Skip to content

Commit

Permalink
Don't abort the game if out of memory allocating data for FreeType
Browse files Browse the repository at this point in the history
  • Loading branch information
UnknownShadow200 committed Jan 5, 2020
1 parent bf13d69 commit e793332
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/Drawer2D.c
Original file line number Diff line number Diff line change
Expand Up @@ -871,9 +871,7 @@ static cc_result SysFont_Init(const String* path, struct SysFont* font, FT_Open_
return 0;
}

static void* FT_AllocWrapper(FT_Memory memory, long size) {
return Mem_Alloc(size, 1, "Freetype data");
}
static void* FT_AllocWrapper(FT_Memory memory, long size) { return Mem_TryAlloc(size, 1); }
static void FT_FreeWrapper(FT_Memory memory, void* block) { Mem_Free(block); }
static void* FT_ReallocWrapper(FT_Memory memory, long cur_size, long new_size, void* block) {
return Mem_Realloc(block, new_size, 1, "Freetype data");
Expand Down

0 comments on commit e793332

Please sign in to comment.