diff --git a/src/wl_window.c b/src/wl_window.c index 658b93e4..62120533 100644 --- a/src/wl_window.c +++ b/src/wl_window.c @@ -522,7 +522,8 @@ void _glfwPlatformDestroyCursor(_GLFWcursor* cursor) if (cursor->wl.image) return; - wl_buffer_destroy(cursor->wl.buffer); + if (cursor->wl.buffer) + wl_buffer_destroy(cursor->wl.buffer); } void _glfwPlatformSetCursor(_GLFWwindow* window, _GLFWcursor* cursor)