Skip to content

Commit

Permalink
Merge pull request #132 from Nutzzz/114sign
Browse files Browse the repository at this point in the history
Fix crash in EADesktopHandler with multiple video controllers
  • Loading branch information
erri120 authored Jun 6, 2024
2 parents 7849827 + d4e0565 commit f26a938
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,10 @@ public static string GetWMIProperty(string className, string propertyName)
var searcher = new ManagementObjectSearcher(selectQuery);

using var results = searcher.Get();
if (results.Count <= 0)
throw new Exception("Property from query is not found.");

var arr = new ManagementBaseObject[1];
var arr = new ManagementBaseObject[results.Count];
results.CopyTo(arr, 0);

var baseObject = arr[0];
Expand Down

0 comments on commit f26a938

Please sign in to comment.