From 34bfaa302d5da8e08620d31d3f40d55ee9d14b98 Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Mon, 4 Oct 2010 14:13:41 +0200 Subject: [PATCH] spicec-x11: make get_clipboard_type handle the None Atom --- client/x11/platform.cpp | 3 +++ 1 file changed, 3 insertions(+) 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;