summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarius Vlad <marius.vlad@collabora.com>2022-05-30 21:36:30 +0300
committerJan-Simon Moeller <jsmoeller@linuxfoundation.org>2022-06-10 21:24:54 +0000
commitc859ca5a97d53a00c43c15dfcd2c39c095be896e (patch)
tree31eb77ea5b54a22954c2c357044202ec28f201a5
parent89440e0ffdfea2568d49e95465464cfc5c1d92ff (diff)
shell: Make sure that app_id is valid before checking it
Bug-AGL: SPEC-4412 Signed-off-by: Marius Vlad <marius.vlad@collabora.com> Change-Id: I427c2920315b223432f273d08a69a069d66310c9
-rw-r--r--src/shell.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/shell.c b/src/shell.c
index 09a9cb2..33a7a72 100644
--- a/src/shell.c
+++ b/src/shell.c
@@ -628,7 +628,7 @@ ivi_check_pending_surface_desktop(struct ivi_surface *surface,
role_pending_list = &ivi->popup_pending_apps;
wl_list_for_each(p_popup, role_pending_list, link) {
- if (!strcmp(app_id, p_popup->app_id)) {
+ if (app_id && !strcmp(app_id, p_popup->app_id)) {
*role = IVI_SURFACE_ROLE_POPUP;
return;
}
@@ -636,7 +636,7 @@ ivi_check_pending_surface_desktop(struct ivi_surface *surface,
role_pending_list = &ivi->split_pending_apps;
wl_list_for_each(p_split, role_pending_list, link) {
- if (!strcmp(app_id, p_split->app_id)) {
+ if (app_id && !strcmp(app_id, p_split->app_id)) {
*role = IVI_SURFACE_ROLE_SPLIT_V;
return;
}
@@ -644,7 +644,7 @@ ivi_check_pending_surface_desktop(struct ivi_surface *surface,
role_pending_list = &ivi->fullscreen_pending_apps;
wl_list_for_each(p_fullscreen, role_pending_list, link) {
- if (!strcmp(app_id, p_fullscreen->app_id)) {
+ if (app_id && !strcmp(app_id, p_fullscreen->app_id)) {
*role = IVI_SURFACE_ROLE_FULLSCREEN;
return;
}
@@ -652,7 +652,7 @@ ivi_check_pending_surface_desktop(struct ivi_surface *surface,
role_pending_list = &ivi->remote_pending_apps;
wl_list_for_each(p_remote, role_pending_list, link) {
- if (!strcmp(app_id, p_remote->app_id)) {
+ if (app_id && !strcmp(app_id, p_remote->app_id)) {
*role = IVI_SURFACE_ROLE_REMOTE;
return;
}