Wayland: Fix a crash when drag and dropping into kitty

Fixes #2432
This commit is contained in:
Kovid Goyal 2020-03-14 08:20:44 +05:30
parent a348f64833
commit aa11ddf32c
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
2 changed files with 4 additions and 2 deletions

View File

@ -73,6 +73,8 @@ To update |kitty|, :doc:`follow the instructions <binary>`.
- Drop support for python 3.5
- Wayland: Fix a crash when drag and dropping into kitty (:iss:`2432`)
0.16.0 [2020-01-28]
--------------------

4
glfw/wl_window.c vendored
View File

@ -1761,14 +1761,14 @@ static void drag_leave(void *data UNUSED, struct wl_data_device *wl_data_device
}
}
static void drop(void *data, struct wl_data_device *wl_data_device UNUSED) {
static void drop(void *data UNUSED, struct wl_data_device *wl_data_device UNUSED) {
for (size_t i = 0; i < arraysz(_glfw.wl.dataOffers); i++) {
if (_glfw.wl.dataOffers[i].offer_type == DRAG_AND_DROP) {
char *uri_list = read_data_offer(_glfw.wl.dataOffers[i].id, URI_LIST_MIME);
if (uri_list) {
wl_data_offer_finish(_glfw.wl.dataOffers[i].id);
int count;
char** paths = parseUriList(data, &count);
char** paths = parseUriList(uri_list, &count);
_GLFWwindow* window = _glfw.windowListHead;
while (window)