Skip to content

Commit

Permalink
Added check to make sure SDL_TTF was initialized.
Browse files Browse the repository at this point in the history
  • Loading branch information
bXi committed Jul 23, 2024
1 parent ca74f0c commit f946256
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions assethandler/assethandler.h
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,10 @@ class AssetHandler {
private:
AssetHandler() {

if (!TTF_WasInit()) {
TTF_Init();
}

SDL_IOStream* rwops = SDL_IOFromConstMem(DroidSansMono_ttf, DroidSansMono_ttf_len);
if (rwops == NULL) {
// Handle error
Expand Down

0 comments on commit f946256

Please sign in to comment.