From 74d29ec21e2c4698102ee18b1e499e05aca97654 Mon Sep 17 00:00:00 2001 From: Joonbum Ko Date: Tue, 20 Nov 2018 14:45:23 +0900 Subject: [PATCH] tpl_wayland_egl_thread: Added an null exception checking. Change-Id: I7fd92cc21c22b9c6a4b2f751829542b1f9402b10 Signed-off-by: Joonbum Ko --- src/tpl_wayland_egl_thread.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/tpl_wayland_egl_thread.c b/src/tpl_wayland_egl_thread.c index aaa73d0..87c54a7 100644 --- a/src/tpl_wayland_egl_thread.c +++ b/src/tpl_wayland_egl_thread.c @@ -2728,6 +2728,11 @@ twe_surface_get_swapchain_buffers(twe_surface_h twe_surface, return TPL_ERROR_INVALID_PARAMETER; } + if (!buffer_count) { + TPL_ERR("Invalid parameter. buffer_count is NULL."); + return TPL_ERROR_INVALID_PARAMETER; + } + if (!surfaces) { *buffer_count = tbm_surface_queue_get_size(surf_source->tbm_queue); return TPL_ERROR_NONE; -- 2.7.4