From 11f2ad60ea9a6e6f6dc546b8a8a05d971129e6cb Mon Sep 17 00:00:00 2001 From: Alon Levy Date: Sun, 5 Jun 2011 11:49:48 +0300 Subject: [PATCH] server/red_worker: validate_surface: print paniced surface_id --- server/red_worker.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/server/red_worker.c b/server/red_worker.c index 30b96583..d1f1176c 100644 --- a/server/red_worker.c +++ b/server/red_worker.c @@ -1185,7 +1185,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)