From f946256c22350f348d01215eccca6fd649167b87 Mon Sep 17 00:00:00 2001 From: Dennis Meinen Date: Tue, 23 Jul 2024 21:22:18 +0200 Subject: [PATCH] Added check to make sure SDL_TTF was initialized. --- assethandler/assethandler.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/assethandler/assethandler.h b/assethandler/assethandler.h index 45a1aa0..b6e4470 100644 --- a/assethandler/assethandler.h +++ b/assethandler/assethandler.h @@ -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