mirror of
https://github.com/glfw/glfw.git
synced 2024-11-26 03:52:01 +00:00
Wayland: Fix double free on data source error
If data source creation fails, the string containing the data for it would be freed a second time during termination.
This commit is contained in:
parent
9c95cfb9f1
commit
b386371f57
@ -312,6 +312,7 @@ information on what to include when reporting a bug.
|
||||
- [Wayland] Bugfix: `glfwPostEmptyEvent` sometimes had no effect (#1520,#1521)
|
||||
- [Wayland] Bugfix: `glfwSetClipboardString` would fail if set to result of
|
||||
`glfwGetClipboardString`
|
||||
- [Wayland] Bugfix: Data source creation error would cause double free at termination
|
||||
- [POSIX] Removed use of deprecated function `gettimeofday`
|
||||
- [POSIX] Bugfix: `CLOCK_MONOTONIC` was not correctly tested for or enabled
|
||||
- [WGL] Disabled the DWM swap interval hack for Windows 8 and later (#1072)
|
||||
|
@ -1683,6 +1683,7 @@ void _glfwSetClipboardStringWayland(const char* string)
|
||||
_glfwInputError(GLFW_PLATFORM_ERROR,
|
||||
"Wayland: Impossible to create clipboard source");
|
||||
_glfw_free(_glfw.wl.clipboardSendString);
|
||||
_glfw.wl.clipboardSendString = NULL;
|
||||
return;
|
||||
}
|
||||
wl_data_source_add_listener(_glfw.wl.dataSource,
|
||||
|
Loading…
Reference in New Issue
Block a user