summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGiulio Camuffo <giuliocamuffo@gmail.com>2015-05-01 00:13:55 +0300
committerDaniel Stone <daniels@collabora.com>2015-05-01 13:01:57 +0100
commit6a94a99f39a8920bf26c38d345c0887ae7144e7f (patch)
tree902fe3db66f2b3e0519ab806a73b8bab8e4c5708
parent4c93c086799ed678844efd9c5eba1e96039c1547 (diff)
downloadweston-6a94a99f39a8920bf26c38d345c0887ae7144e7f.tar.gz
weston-6a94a99f39a8920bf26c38d345c0887ae7144e7f.tar.bz2
weston-6a94a99f39a8920bf26c38d345c0887ae7144e7f.zip
clipboard: don't crash if the source client does not send a mime type
Reviewed-by: Daniel Stone <daniels@collabora.com>
-rw-r--r--src/clipboard.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/clipboard.c b/src/clipboard.c
index c1091a9c..994c3016 100644
--- a/src/clipboard.c
+++ b/src/clipboard.c
@@ -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]);