Commit 351e658f authored by Adrien Plazas's avatar Adrien Plazas
Browse files

appstream: Assume devices non-compatible on null chassis

This will avoids some apps to be incorrectly flagged as compatible with
the device until the chassis information is being retrieved.
parent 8d8a5398
......@@ -452,7 +452,12 @@ static gboolean
gs_appstream_is_compatible_device (XbNode *component)
{
const gchar *chassis_type = get_chassis_type (NULL);
gboolean form_factor_set = !!xb_node_query_text (component, "custom/value[@key='Purism::form_factor']", NULL);
gboolean form_factor_set;
if (!chassis_type)
return FALSE;
form_factor_set = !!xb_node_query_text (component, "custom/value[@key='Purism::form_factor']", NULL);
if (g_strcmp0 (chassis_type, "desktop") == 0 ||
g_strcmp0 (chassis_type, "laptop") == 0)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment