Skip to content
Permalink
Browse files

Don't abort the game if out of memory allocating data for FreeType

  • Loading branch information
UnknownShadow200 committed Jan 5, 2020
1 parent bf13d69 commit e793332132788601dc035a9fa9f65f857010a625
Showing with 1 addition and 3 deletions.
  1. +1 −3 src/Drawer2D.c
@@ -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");

0 comments on commit e793332

Please sign in to comment.
You can’t perform that action at this time.