Skip to content

Commit

Permalink
improve error handling
Browse files Browse the repository at this point in the history
  • Loading branch information
tparvu committed Nov 16, 2024
1 parent 2c12b65 commit 4df4105
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/systeminfo/systeminfo.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,11 @@ func (si *SystemInfo) getGpuData() {
si.GPU = &GpuData{Model: GetNVIDIAGpuModel()}
return
} else if strings.Contains(line, "VGA compatible controller") && strings.Contains(line, "Advanced Micro Devices") {
// AMD
si.GPU = &GpuData{Model: GetAMDGpuModels()[0]}
// AMD Models for now just use first one
models, err := GetAMDGpuModels()
if err == nil && len(models) > 0 {
si.GPU = &GpuData{Model: models[0]}
}
return
} else {
si.GPU = nil
Expand Down

0 comments on commit 4df4105

Please sign in to comment.