Fix MinGW pipeline after 49cb59778a

Broken build job: https://gitlab.com/libvirt/libvirt/-/jobs/951162206

Signed-off-by: Erik Skultety <eskultet@redhat.com>
This commit is contained in:
Erik Skultety 2021-01-08 11:33:44 +01:00
parent 51d1a2cacf
commit 0d49a565e5

View File

@ -354,7 +354,12 @@ virMediatedDevicePtr
virMediatedDeviceListSteal(virMediatedDeviceListPtr list,
virMediatedDevicePtr dev)
{
int idx = virMediatedDeviceListFindIndex(list, dev->path);
int idx = -1;
if (!dev)
return NULL;
idx = virMediatedDeviceListFindIndex(list, dev->path);
return virMediatedDeviceListStealIndex(list, idx);
}