mirror of
https://github.com/momo5502/hypervisor.git
synced 2025-04-18 21:22:54 +00:00
Try accessing the device first
This commit is contained in:
parent
55234c3504
commit
e9d4b3345c
@ -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();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user