clipboard: don't crash if the source client does not send a mime type

Reviewed-by: Daniel Stone <daniels@collabora.com>
dev
Giulio Camuffo 10 years ago committed by Daniel Stone
parent 4c93c08679
commit 6a94a99f39
  1. 2
      src/clipboard.c

@ -254,7 +254,7 @@ clipboard_set_selection(struct wl_listener *listener, void *data)
mime_types = source->mime_types.data; mime_types = source->mime_types.data;
if (pipe2(p, O_CLOEXEC) == -1) if (!mime_types || pipe2(p, O_CLOEXEC) == -1)
return; return;
source->send(source, mime_types[0], p[1]); source->send(source, mime_types[0], p[1]);

Loading…
Cancel
Save