From 9ac9c61433150a255e6bdbe4c5f9d3f819aa1096 Mon Sep 17 00:00:00 2001 From: Emmanuel Gil Peyrot Date: Mon, 16 Nov 2015 21:57:36 +0000 Subject: [PATCH] Wayland: Make sure the cursor buffer is valid Fixes #645. --- src/wl_window.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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)