Try accessing the device first

This commit is contained in:
momo5502 2024-05-21 13:23:38 +02:00
parent 55234c3504
commit e9d4b3345c

View File

@ -45,6 +45,22 @@ namespace
static driver hypervisor{}; static driver hypervisor{};
static driver_device device{}; static driver_device device{};
if (!device)
{
try
{
device = create_driver_device();
}
catch (...)
{
}
}
if (device)
{
return device;
}
if (!hypervisor) if (!hypervisor)
{ {
hypervisor = create_driver(); hypervisor = create_driver();