mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-28 03:01:57 +02:00
X11: Fix a crash if the X server requests clipboard data after we have relinquished the clipboard
Fixes #5650
This commit is contained in:
1
glfw/x11_window.c
vendored
1
glfw/x11_window.c
vendored
@@ -719,6 +719,7 @@ static bool createNativeWindow(_GLFWwindow* window,
|
||||
static size_t
|
||||
get_clipboard_data(const _GLFWClipboardData *cd, const char *mime, char **data) {
|
||||
*data = NULL;
|
||||
if (cd->get_data == NULL) { return 0; }
|
||||
GLFWDataChunk chunk = cd->get_data(mime, NULL, cd->ctype);
|
||||
char *buf = NULL;
|
||||
size_t sz = 0, cap = 0;
|
||||
|
||||
Reference in New Issue
Block a user