SDL_ttf: testgputext: Don't crash if the desired font cannot be found in the cwd

https://github.com/libsdl-org/SDL_ttf/commit/a343d6bd4ca87aa15b472e5738ebd8fde936bfdb

From a343d6bd4ca87aa15b472e5738ebd8fde936bfdb Mon Sep 17 00:00:00 2001
From: Simon McVittie <[EMAIL REDACTED]>
Date: Wed, 8 Jan 2025 17:21:56 +0000
Subject: [PATCH] testgputext: Don't crash if the desired font cannot be found
 in the cwd

Signed-off-by: Simon McVittie <smcv@debian.org>
---
 examples/testgputext.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/examples/testgputext.c b/examples/testgputext.c
index eb315876..09a9d458 100644
--- a/examples/testgputext.c
+++ b/examples/testgputext.c
@@ -328,6 +328,8 @@ int main(int argc, char *argv[])
 
     check_error_bool(TTF_Init());
     TTF_Font *font = check_error_ptr(TTF_OpenFont("NotoSansMono-Regular.ttf", 50));
+    if (!font)
+        running = false;
     TTF_SetFontWrapAlignment(font, TTF_HORIZONTAL_ALIGN_CENTER);
     TTF_TextEngine *engine = check_error_ptr(TTF_CreateGPUTextEngine(context.device));