summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2010-10-04 14:13:41 +0200
committerHans de Goede <hdegoede@redhat.com>2010-10-04 14:41:23 +0200
commit34bfaa302d5da8e08620d31d3f40d55ee9d14b98 (patch)
tree7c825d1fb3ce01fb7e83da4e98fe704e1e635dbe
parentb74f21ce66ff9d41d16a7d344a4f795aa2dd4297 (diff)
downloadspice-34bfaa302d5da8e08620d31d3f40d55ee9d14b98.tar.gz
spice-34bfaa302d5da8e08620d31d3f40d55ee9d14b98.tar.xz
spice-34bfaa302d5da8e08620d31d3f40d55ee9d14b98.zip
spicec-x11: make get_clipboard_type handle the None Atom
-rw-r--r--client/x11/platform.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/client/x11/platform.cpp b/client/x11/platform.cpp
index c1c2a5a3..29b5f753 100644
--- a/client/x11/platform.cpp
+++ b/client/x11/platform.cpp
@@ -184,6 +184,9 @@ static const char *atom_name(Atom atom)
static uint32_t get_clipboard_type(Atom target) {
int i;
+ if (target == None)
+ return VD_AGENT_CLIPBOARD_NONE;
+
for (i = 0; i < utf8_atom_count; i++)
if (utf8_atoms[i] == target)
return VD_AGENT_CLIPBOARD_UTF8_TEXT;