From 323917ab4ba80c6e91185ac214aba6aa51cc1c48 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20=C3=85dahl?= Date: Mon, 20 May 2019 12:30:22 +0200 Subject: [PATCH] module-portal: Handle no app_id being set Avoid crashing if the portal would for whatever reason fail to set this. --- src/modules/module-portal.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/modules/module-portal.c b/src/modules/module-portal.c index 4567fe1f6..c52416bf6 100644 --- a/src/modules/module-portal.c +++ b/src/modules/module-portal.c @@ -680,7 +680,8 @@ static DBusHandlerResult permission_store_changed_handler(DBusConnection *connec if (cinfo->is_portal) continue; - if (strcmp(cinfo->app_id, app_id) != 0) + if (cinfo->app_id == NULL || + strcmp(cinfo->app_id, app_id) != 0) continue; if (!(cinfo->media_roles & MEDIA_ROLE_CAMERA))