From: Gwanglim Lee Date: Mon, 18 Nov 2019 05:44:20 +0000 (+0900) Subject: e_comp_wl_capture: added missing tbm_surface API return value check X-Git-Tag: submit/tizen/20191120.103427~10 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=50feefe4d0444d58d3bbb10fc7c699290ed2bcfa;p=platform%2Fupstream%2Fenlightenment.git e_comp_wl_capture: added missing tbm_surface API return value check Change-Id: I055ad919cdc936c0f5b8e002179a5c21ad27dbcb --- diff --git a/src/bin/e_comp_wl_capture.c b/src/bin/e_comp_wl_capture.c index a8db50c768..0ed6b89579 100644 --- a/src/bin/e_comp_wl_capture.c +++ b/src/bin/e_comp_wl_capture.c @@ -312,7 +312,11 @@ _e_capture_client_main_composite(Thread_Data *td, pixman_image_t *target_image) src_ptr = info.planes[0].ptr; w = tbm_surface_get_width(td->tbm_surface); + EINA_SAFETY_ON_FALSE_GOTO(w > 0, clean_up); + h = tbm_surface_get_height(td->tbm_surface); + EINA_SAFETY_ON_FALSE_GOTO(h > 0, clean_up); + src_img = pixman_image_create_bits(src_format, w, h, (uint32_t*)src_ptr, info.planes[0].stride); EINA_SAFETY_ON_NULL_GOTO(src_img, clean_up); }