Wayland: Make sure the cursor’s buffer is valid before destroying it.

This commit is contained in:
Emmanuel Gil Peyrot 2015-11-16 21:57:36 +00:00
parent 580c7da559
commit 042c7a79ee

View File

@ -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)