diff --git a/README.md b/README.md index 75d09bb9..d406c878 100644 --- a/README.md +++ b/README.md @@ -131,6 +131,7 @@ information on what to include when reporting a bug. - [Cocoa] Bugfix: A connected Apple AirPlay would emit a useless error (#1791) - [Wayland] Bugfix: `glfwSetClipboardString` would fail if set to result of `glfwGetClipboardString` + - [Wayland] Bugfix: Data source creation error would cause double free at termination ## Contact diff --git a/src/wl_window.c b/src/wl_window.c index 0bea8974..e425da78 100644 --- a/src/wl_window.c +++ b/src/wl_window.c @@ -1817,6 +1817,7 @@ void _glfwPlatformSetClipboardString(const char* string) _glfwInputError(GLFW_PLATFORM_ERROR, "Wayland: Impossible to create clipboard source"); free(_glfw.wl.clipboardSendString); + _glfw.wl.clipboardSendString = NULL; return; } wl_data_source_add_listener(_glfw.wl.dataSource,