module-portal: Handle no app_id being set

Avoid crashing if the portal would for whatever reason fail to set this.
This commit is contained in:
Jonas Ådahl 2019-05-20 12:30:22 +02:00 committed by Wim Taymans
parent 55eadd6c4c
commit 323917ab4b

View file

@ -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))