From 276a74b534273d9dc290e8e93cced6f0af767248 Mon Sep 17 00:00:00 2001 From: SuperUserNameMan <9801802+SuperUserNameMan@users.noreply.github.com> Date: Mon, 15 Jul 2024 10:00:32 +0200 Subject: [PATCH] `rcore.c` : `InitWindow()` check `InitPlatform()` success. --- src/rcore.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/rcore.c b/src/rcore.c index e68a9a7d5..9cd9eb04f 100644 --- a/src/rcore.c +++ b/src/rcore.c @@ -631,7 +631,12 @@ void InitWindow(int width, int height, const char *title) // Initialize platform //-------------------------------------------------------------- - InitPlatform(); + if ( InitPlatform() != 0 ) + { + TRACELOG(LOG_ERROR, "Platform backend: Window initialization failed."); + CORE.Window.ready = false; + return; + } //-------------------------------------------------------------- // Initialize rlgl default data (buffers and shaders)