[Spice-devel] [RFC v4 43/62] server/red_worker: red_create_surface - check for dcc before sending messages

Alon Levy alevy at redhat.com
Tue Apr 26 03:55:08 PDT 2011


---
 server/red_worker.c |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/server/red_worker.c b/server/red_worker.c
index 2c8ce2e..75d222f 100644
--- a/server/red_worker.c
+++ b/server/red_worker.c
@@ -8850,8 +8850,9 @@ static inline void red_create_surface(RedWorker *worker, Surfaces *surfaces,
         if (!surface->context.canvas) {
             PANIC("drawing canvas creating failed - can`t create same type canvas");
         }
-
-        red_create_surface_item(worker, dcc, surface_id);
+        if (dcc) {
+            red_create_surface_item(worker, dcc, surface_id);
+        }
         return;
     }
 
@@ -8862,7 +8863,9 @@ static inline void red_create_surface(RedWorker *worker, Surfaces *surfaces,
                                                             surface->context.format, line_0);
         if (surface->context.canvas) { //no need canvas check
             worker->renderer = worker->renderers[i];
-            red_create_surface_item(worker, dcc, surface_id);
+            if (dcc) {
+                red_create_surface_item(worker, dcc, surface_id);
+            }
             return;
         }
     }
-- 
1.7.4.4



More information about the Spice-devel mailing list