mirror of
https://git.proxmox.com/git/fwupd
synced 2025-08-07 23:37:53 +00:00
trivial: Show a critical warning if a device has no context
This commit is contained in:
parent
d938ab62e6
commit
b2ee236060
@ -1609,8 +1609,11 @@ static void
|
|||||||
fu_device_add_guid_quirks (FuDevice *self, const gchar *guid)
|
fu_device_add_guid_quirks (FuDevice *self, const gchar *guid)
|
||||||
{
|
{
|
||||||
FuDevicePrivate *priv = GET_PRIVATE (self);
|
FuDevicePrivate *priv = GET_PRIVATE (self);
|
||||||
if (priv->ctx == NULL)
|
if (priv->ctx == NULL) {
|
||||||
|
g_autofree gchar *str = fu_device_to_string (self);
|
||||||
|
g_critical ("no FuContext assigned for %s", str);
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
fu_context_lookup_quirk_by_id_iter (priv->ctx, guid, fu_device_quirks_iter_cb, self);
|
fu_context_lookup_quirk_by_id_iter (priv->ctx, guid, fu_device_quirks_iter_cb, self);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user