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(); }