From 8a4948f92c82f7409f53e444fa54784e34fa87c0 Mon Sep 17 00:00:00 2001 From: Au Doan Ngoc Date: Tue, 28 Feb 2023 17:19:03 +0700 Subject: ivi-controller: Fix the problem of assigning an address to a pointer In function controller_screen_get, iviscrn should be checked for null before assigning it to a pointer. Signed-off-by: Au Doan Ngoc --- weston-ivi-shell/src/ivi-controller.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/weston-ivi-shell/src/ivi-controller.c b/weston-ivi-shell/src/ivi-controller.c index c27966a..e6de020 100644 --- a/weston-ivi-shell/src/ivi-controller.c +++ b/weston-ivi-shell/src/ivi-controller.c @@ -1429,14 +1429,14 @@ controller_screen_get(struct wl_client *client, int32_t layer_count, i; uint32_t id; - lyt = iviscrn->shell->interface; - if (!iviscrn) { ivi_wm_screen_send_error(resource, IVI_WM_SCREEN_ERROR_NO_SCREEN, "the output is already destroyed"); return; } + lyt = iviscrn->shell->interface; + if (param & IVI_WM_PARAM_RENDER_ORDER) { lyt->get_layers_on_screen(iviscrn->output, &layer_count, &layer_list); -- cgit v1.2.1