Skip to content

Commit 35f8630

Browse files
committed
Read once, not always
1 parent 342d04b commit 35f8630

1 file changed

Lines changed: 7 additions & 5 deletions

File tree

includes/_Checks.au3

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -346,11 +346,13 @@ Func _GPUHWIDCheck($sGPU)
346346
$aGPU = StringSplit($sGPU, "&", $STR_NOCOUNT)
347347
If UBound($aGPU) < 2 Then ContinueLoop
348348

349-
$aIDs = FileReadToArray(@LocalAppDataDir & "\WhyNotWin11\PCI.ids")
350-
If @error Then
351-
$aReturn[0] = 0
352-
$aReturn[1] = 3
353-
ExitLoop
349+
If Not IsArray($aIDs) Then
350+
$aIDs = FileReadToArray(@LocalAppDataDir & "\WhyNotWin11\PCI.ids")
351+
If @error Then
352+
$aReturn[0] = 0
353+
$aReturn[1] = 3
354+
ExitLoop
355+
EndIf
354356
EndIf
355357

356358
$iStart = _ArraySearch($aIDs, "^" & StringReplace($aGPU[0], "PCI\VEN_", ""), 0, 0, 0, 3)

0 commit comments

Comments
 (0)