mirror of
https://gitlab.freedesktop.org/wayland/weston
synced 2024-10-06 23:34:52 +00:00
clipboard: don't crash if the source client does not send a mime type
Reviewed-by: Daniel Stone <daniels@collabora.com>
This commit is contained in:
parent
4c93c08679
commit
6a94a99f39
|
@ -254,7 +254,7 @@ clipboard_set_selection(struct wl_listener *listener, void *data)
|
|||
|
||||
mime_types = source->mime_types.data;
|
||||
|
||||
if (pipe2(p, O_CLOEXEC) == -1)
|
||||
if (!mime_types || pipe2(p, O_CLOEXEC) == -1)
|
||||
return;
|
||||
|
||||
source->send(source, mime_types[0], p[1]);
|
||||
|
|
Loading…
Reference in a new issue