[Spice-devel] [PATCH 2/6] server/red_worker: validate_surface: print paniced surface_id

Alon Levy alevy at redhat.com
Mon Jun 20 04:18:05 PDT 2011


---
 server/red_worker.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/server/red_worker.c b/server/red_worker.c
index 12f7fa5..3ffb52c 100644
--- a/server/red_worker.c
+++ b/server/red_worker.c
@@ -1042,7 +1042,10 @@ static inline void __validate_surface(RedWorker *worker, uint32_t surface_id)
 static inline void validate_surface(RedWorker *worker, uint32_t surface_id)
 {
     PANIC_ON(surface_id >= worker->n_surfaces);
-    PANIC_ON(!worker->surfaces[surface_id].context.canvas);
+    if (!worker->surfaces[surface_id].context.canvas) {
+        red_printf("failed on %d", surface_id);
+        PANIC_ON(!worker->surfaces[surface_id].context.canvas);
+    }
 }
 
 static char *draw_type_to_str(uint8_t type)
-- 
1.7.5.2



More information about the Spice-devel mailing list