5
0
mirror of https://github.com/wailsapp/wails.git synced 2025-05-02 03:01:45 +08:00

Fix Nil pointer if GPU does not provide device info (#3108)

* Fix Nil pointer if GPU does not provide device info
* Updated changelog format

---------

Co-authored-by: Lea Anthony <lea.anthony@gmail.com>
This commit is contained in:
atterpac 2023-12-09 16:21:21 -07:00 committed by GitHub
parent 975c55a3d5
commit e3af0945d0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 0 deletions

View File

@ -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})
}

View File

@ -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