Skip to content

Commit

Permalink
Fix Nil pointer if GPU does not provide device info (#3108)
Browse files Browse the repository at this point in the history
* Fix Nil pointer if GPU does not provide device info
* Updated changelog format

---------

Co-authored-by: Lea Anthony <[email protected]>
  • Loading branch information
atterpac and leaanthony authored Dec 9, 2023
1 parent 975c55a commit e3af094
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
4 changes: 4 additions & 0 deletions v2/cmd/wails/doctor.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,10 @@ func diagnoseEnvironment(f *flags.Doctor) error {
if len(gpu.GraphicsCards) > 1 {
prefix = "GPU " + strconv.Itoa(idx+1) + " "
}
if card.DeviceInfo == nil {
systemTabledata = append(systemTabledata, []string{prefix, "Unknown"})
continue
}
details := fmt.Sprintf("%s (%s) - Driver: %s", card.DeviceInfo.Product.Name, card.DeviceInfo.Vendor.Name, card.DeviceInfo.Driver)
systemTabledata = append(systemTabledata, []string{prefix, details})
}
Expand Down
3 changes: 3 additions & 0 deletions website/src/pages/changelog.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Fixed
- Segfault in `wails doctor` when GPU device information is not provided. Thanks to [@atterpac](https://github.com/atterpac) for the fix ([#3108](https://github.com/wailsapp/wails/pull/3108)).

## v2.7.0 - 2023-12-09

### Added
Expand Down

0 comments on commit e3af094

Please sign in to comment.