From de8ac10653645f0f022b28a880d071bcaf9ff695 Mon Sep 17 00:00:00 2001 From: Gary Talent Date: Wed, 7 May 2025 00:01:49 -0500 Subject: [PATCH] [turbine/glfw] Fix closing when no shutdown handler is set --- src/olympic/turbine/src/glfw/gfx.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/olympic/turbine/src/glfw/gfx.cpp b/src/olympic/turbine/src/glfw/gfx.cpp index d47b2c54..767cef8a 100644 --- a/src/olympic/turbine/src/glfw/gfx.cpp +++ b/src/olympic/turbine/src/glfw/gfx.cpp @@ -96,7 +96,7 @@ static void handleGlfwKeyEvent(GLFWwindow *window, int key, int, int action, int static void handleGlfwWindowCloseEvent(GLFWwindow *window) noexcept { auto &ctx = *static_cast(glfwGetWindowUserPointer(window)); ctx.mandatoryRefreshPeriodEnd = ticksMs(ctx) + config::MandatoryRefreshPeriod; - ctx.running = !ctx.shutdownHandler(ctx); + ctx.running = ctx.shutdownHandler ? !ctx.shutdownHandler(ctx) : false; glfwSetWindowShouldClose(window, !ctx.running); glfwPostEmptyEvent(); }