From: Junkyeong Kim Date: Wed, 5 Sep 2018 05:44:09 +0000 (+0900) Subject: virtual: fix segfault error X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F32%2F188432%2F1;p=platform%2Fcore%2Fuifw%2Flibtdm.git virtual: fix segfault error Change-Id: I792d74380b4cf0ba15c817139b4508c23b631c90 Signed-off-by: Junkyeong Kim --- diff --git a/src/tdm_layer.c b/src/tdm_layer.c index ea70afa..f0b6e02 100644 --- a/src/tdm_layer.c +++ b/src/tdm_layer.c @@ -944,13 +944,14 @@ _tdm_layer_commit(tdm_layer *layer, tdm_layer_commit_handler func, void *user_da layer_commit_handler->committed_buffer = private_layer->waiting_buffer; private_layer->waiting_buffer = NULL; + if (!private_layer->committing && layer_commit_handler->committed_buffer) + private_layer->commiting_buffer = layer_commit_handler->committed_buffer->buffer; + if (private_layer->committing) TDM_WRN("layer(%p,%d) too many commit", private_layer, private_layer->index); else private_layer->committing = 1; - private_layer->commiting_buffer = layer_commit_handler->committed_buffer->buffer; - if (tdm_debug_module & TDM_DEBUG_BUFFER) TDM_INFO("layer(%p,%d) waiting_buffer(%p) committed_buffer(%p)", private_layer, private_layer->index, private_layer->waiting_buffer, diff --git a/src/tdm_output.c b/src/tdm_output.c index 4430a80..fd55bb7 100644 --- a/src/tdm_output.c +++ b/src/tdm_output.c @@ -1459,6 +1459,7 @@ tdm_output_commit_internal(tdm_output *output, int sync, tdm_output_commit_handl private_layer->committed_buffer = private_layer->waiting_buffer; private_layer->waiting_buffer = NULL; + private_layer->commiting_buffer = NULL; if (tdm_debug_module & TDM_DEBUG_BUFFER) TDM_INFO("layer(%p) waiting_buffer(%p) committed_buffer(%p)", private_layer, private_layer->waiting_buffer,