Fix null reference in MemoryGroup when Ring0 is disabled. (#1796)
* Create RAMSPDToolkitDriver with null when Ring0 is absent * Update MemoryGroup.cs --------- Co-authored-by: PhyxionNL <7643972+PhyxionNL@users.noreply.github.com>
This commit is contained in:
@@ -33,10 +33,16 @@ internal class MemoryGroup : IGroup
|
||||
{
|
||||
if (Ring0.IsOpen)
|
||||
{
|
||||
//Assign implementation of IDriver
|
||||
// Assign implementation of IDriver.
|
||||
DriverManager.Driver = new RAMSPDToolkitDriver(Ring0.KernelDriver);
|
||||
SMBusManager.UseWMI = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
// Still need to set Driver if Ring0 is absent.
|
||||
DriverManager.Driver = new RAMSPDToolkitDriver(null);
|
||||
SMBusManager.UseWMI = false;
|
||||
}
|
||||
}
|
||||
|
||||
public MemoryGroup(ISettings settings)
|
||||
|
||||
Reference in New Issue
Block a user