Skip to content

Commit

Permalink
fix cross initialisation
Browse files Browse the repository at this point in the history
  • Loading branch information
FolkertVanVerseveld committed Dec 29, 2024
1 parent faed76c commit 1ef1287
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion game/src/engine/font.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ static ImFont *try_add_font(ImFontAtlas *a, const char *path, float size) {
FILE *f;
void *blob = NULL;
ImFont *fnt = NULL;
ImFontConfig cfg;

if (!(f = fopen(path, "rb")))
return NULL;
Expand All @@ -71,7 +72,6 @@ static ImFont *try_add_font(ImFontAtlas *a, const char *path, float size) {
if (fsize < 0 || !(blob = malloc(fsize)) || fread(blob, fsize, 1, f) != 1)
goto fail;

ImFontConfig cfg;
// make sure it is copied by ImGui, so we can free and don't have to leak memory
cfg.FontDataOwnedByAtlas = false;

Expand Down

0 comments on commit 1ef1287

Please sign in to comment.