From 207cd48a7a1c8302165458328223cc02882e6308 Mon Sep 17 00:00:00 2001 From: light7734 Date: Wed, 16 Jul 2025 13:56:28 +0330 Subject: [PATCH] fix: glfw window create before glfw init --- modules/window/src/linux/window.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/window/src/linux/window.cpp b/modules/window/src/linux/window.cpp index 0b9cb27..4261b9c 100644 --- a/modules/window/src/linux/window.cpp +++ b/modules/window/src/linux/window.cpp @@ -16,8 +16,7 @@ auto Window::create(const std::function &callback) -> Scope callback) - : m_handle(glfwCreateWindow(1u, 1u, "", nullptr, nullptr)) - , m_event_callback(std::move(std::move(callback))) + : m_event_callback(std::move(std::move(callback))) { ensure(glfwInit(), "Failed to initialize 'glfw'"); @@ -26,7 +25,8 @@ lWindow::lWindow(std::function callback) glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE); glfwWindowHint(GLFW_VISIBLE, GLFW_FALSE); - + // NOLINTNEXTLINE(cppcoreguidelines-prefer-member-initializer) + m_handle = glfwCreateWindow(1u, 1u, "", nullptr, nullptr); ensure(m_handle, "Failed to create 'GLFWwindow'"); glfwSetWindowUserPointer(m_handle, &m_event_callback);