From d0d3311afdb0f742420e8aae09d48076cc530620 Mon Sep 17 00:00:00 2001 From: Changyeon Lee Date: Mon, 26 Sep 2016 11:56:41 +0900 Subject: [PATCH] return error when enqueue surface but queue is empty Change-Id: Ic82f7abf2bf3d713769072b6d4265c92b48565d5 --- src/tbm_surface_queue.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/tbm_surface_queue.c b/src/tbm_surface_queue.c index 4728ac6..41e8f71 100644 --- a/src/tbm_surface_queue.c +++ b/src/tbm_surface_queue.c @@ -914,10 +914,11 @@ tbm_surface_queue_enqueue(tbm_surface_queue_h _tbm_surface_queue_enqueue(surface_queue, node, 1); if (_queue_is_empty(&surface_queue->dirty_queue)) { + TBM_LOG_E("enqueue surface but queue is empty node:%p\n", node); pthread_mutex_unlock(&surface_queue->lock); _tbm_surf_queue_mutex_unlock(); - return TBM_SURFACE_QUEUE_ERROR_NONE; + return TBM_SURFACE_QUEUE_ERROR_INVALID_SURFACE; } node->type = QUEUE_NODE_TYPE_ENQUEUE; -- 2.7.4