Skip to content

Commit

Permalink
Update fontstash.h
Browse files Browse the repository at this point in the history
* change call order in `fonsDeleteInternal` so that free memory isn't passed to `fons__tt_done`
  • Loading branch information
mulle-nat authored Oct 31, 2021
1 parent 077b65e commit ba85215
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/fontstash.h
Original file line number Diff line number Diff line change
Expand Up @@ -1660,8 +1660,8 @@ void fonsDeleteInternal(FONScontext* stash)
if (stash->fonts) free(stash->fonts);
if (stash->texData) free(stash->texData);
if (stash->scratch) free(stash->scratch);
free(stash);
fons__tt_done(stash);
free(stash);
}

void fonsSetErrorCallback(FONScontext* stash, void (*callback)(void* uptr, int error, int val), void* uptr)
Expand Down

0 comments on commit ba85215

Please sign in to comment.