1
0
mirror of https://github.com/DarthAffe/RGB.NET.git synced 2025-12-13 01:58:30 +00:00

Added a workaround for the AccessViolation-problem in the aura-sdk

This commit is contained in:
Darth Affe 2017-11-26 08:34:36 +01:00
parent 338936d42f
commit 83a3ea4e01

View File

@ -95,7 +95,9 @@ namespace RGB.NET.Devices.Asus
try
{
int mainboardCount = _AsusSDK.EnumerateMbController(IntPtr.Zero, 0);
//TODO DarthAffe 26.11.2017: This is not a fix! There might really be a second controller on the mainboard, but for now this should prevent the random crash for some guys.
// DarthAffe 26.11.2017: https://rog.asus.com/forum/showthread.php?97754-Access-Violation-Wrong-EnumerateMB-Result&p=688901#post688901
int mainboardCount = Math.Max(1, _AsusSDK.EnumerateMbController(IntPtr.Zero, 0));
if (mainboardCount > 0)
{
IntPtr mainboardHandles = Marshal.AllocHGlobal(mainboardCount * IntPtr.Size);