[Spice-devel] [PATCH spice] spicec: fix ASSERT to accept size == 0

Arnon Gilboa agilboa at redhat.com
Wed Nov 24 00:41:56 PST 2010


which is useful when calling RedClient::on_clipboard_notify(VD_AGENT_CLIPBOARD_NONE, NULL, 0);
---
 client/red_client.cpp |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/client/red_client.cpp b/client/red_client.cpp
index 0fc4815..46d5602 100644
--- a/client/red_client.cpp
+++ b/client/red_client.cpp
@@ -888,7 +888,7 @@ void RedClient::on_clipboard_release()
 
 void RedClient::send_agent_clipboard_notify_message(uint32_t type, uint8_t *data, uint32_t size)
 {
-    ASSERT(size && data);
+    ASSERT(data || !size);
     if (!_agent_connected) {
         return;
     }
-- 
1.5.5.6



More information about the Spice-devel mailing list