1
0
mirror of https://github.com/momo5502/hypervisor.git synced 2025-06-30 16:21:53 +00:00

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_device device{};
if (!device)
{
try
{
device = create_driver_device();
}
catch (...)
{
}
}
if (device)
{
return device;
}
if (!hypervisor)
{
hypervisor = create_driver();