From 042c7a79ee953924864f8fb5ed565e62ac0e1a09 Mon Sep 17 00:00:00 2001 From: Emmanuel Gil Peyrot Date: Mon, 16 Nov 2015 21:57:36 +0000 Subject: [PATCH] =?UTF-8?q?Wayland:=20Make=20sure=20the=20cursor=E2=80=99s?= =?UTF-8?q?=20buffer=20is=20valid=20before=20destroying=20it.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 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 658b93e45..621205330 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)