applications: Properly protect against NULL app_id
The 'app_id' variable can be NULL, and g_str_has_prefix() does not particularly enjoy that.
This commit is contained in:
parent
de26f9a8f5
commit
00cb6386e4
1 changed files with 1 additions and 1 deletions
|
@ -794,7 +794,7 @@ add_static_permissions (CcApplicationsPanel *self,
|
|||
gint added = 0;
|
||||
g_autofree gchar *text = NULL;
|
||||
|
||||
if (!g_str_has_prefix (app_id, PORTAL_SNAP_PREFIX))
|
||||
if (app_id && !g_str_has_prefix (app_id, PORTAL_SNAP_PREFIX))
|
||||
keyfile = get_flatpak_metadata (app_id);
|
||||
if (keyfile == NULL)
|
||||
return FALSE;
|
||||
|
|
Loading…
Add table
Reference in a new issue