mirror of
https://git.proxmox.com/git/fwupd
synced 2025-08-14 07:09:57 +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),
|
||||
fu_device_get_id (device));
|
||||
device_alt = fu_device_get_alternate (device);
|
||||
|
||||
if (!device_alt)
|
||||
if (device_alt == NULL) {
|
||||
g_set_error (error,
|
||||
FWUPD_ERROR,
|
||||
FWUPD_ERROR_NOT_SUPPORTED,
|
||||
"No alternate device for %s",
|
||||
fu_device_get_name (device));
|
||||
return FALSE;
|
||||
}
|
||||
g_debug ("Preventing upgrades for: %s (%s)", fu_device_get_name (device_alt),
|
||||
fu_device_get_id (device_alt));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user