mirror of
https://git.proxmox.com/git/fwupd
synced 2025-08-16 10:06:41 +00:00
dell: Don't crash when the alternate device has not been set
I don't think this is possible, but it's the right thing to do...
This commit is contained in:
parent
80b2c237c2
commit
8a6fdf8e18
@ -772,9 +772,14 @@ fu_plugin_unlock (FuPlugin *plugin, FuDevice *device, GError **error)
|
|||||||
g_debug ("Unlocking upgrades for: %s (%s)", fu_device_get_name (device),
|
g_debug ("Unlocking upgrades for: %s (%s)", fu_device_get_name (device),
|
||||||
fu_device_get_id (device));
|
fu_device_get_id (device));
|
||||||
device_alt = fu_device_get_alternate (device);
|
device_alt = fu_device_get_alternate (device);
|
||||||
|
if (device_alt == NULL) {
|
||||||
if (!device_alt)
|
g_set_error (error,
|
||||||
|
FWUPD_ERROR,
|
||||||
|
FWUPD_ERROR_NOT_SUPPORTED,
|
||||||
|
"No alternate device for %s",
|
||||||
|
fu_device_get_name (device));
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
}
|
||||||
g_debug ("Preventing upgrades for: %s (%s)", fu_device_get_name (device_alt),
|
g_debug ("Preventing upgrades for: %s (%s)", fu_device_get_name (device_alt),
|
||||||
fu_device_get_id (device_alt));
|
fu_device_get_id (device_alt));
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user