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:
committed by
Daniel Stone
parent
4c93c08679
commit
6a94a99f39
+1
-1
@@ -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]);
|
||||
|
||||
Reference in New Issue
Block a user