Fix Nil pointer if GPU does not provide device info#3108
Fix Nil pointer if GPU does not provide device info#3108leaanthony merged 3 commits intowailsapp:masterfrom
Conversation
WalkthroughThe recent updates focus on a fix within the Wails framework, specifically addressing a segmentation fault in the Changes
TipsChat with CodeRabbit Bot (
|
changelog.mdx squash
There was a problem hiding this comment.
Review Status
Actionable comments generated: 1
Configuration used: CodeRabbit UI
Files selected for processing (2)
- v2/cmd/wails/doctor.go (1 hunks)
- website/src/pages/changelog.mdx (1 hunks)
Additional comments: 2
v2/cmd/wails/doctor.go (2)
104-113: The addition of the nil check for
card.DeviceInfois a good defensive programming practice to prevent potential nil pointer dereferences when the GPU does not provide device information. This change correctly implements the PR's objective to fix the nil pointer exception issue.104-113: The changes are localized and do not affect any exported or public entities, which is consistent with the PR's non-breaking change claim.
website/src/pages/changelog.mdx
Outdated
|
|
||
| ## [Unreleased] | ||
|
|
||
| - Fix `wails doctor` segfault if device does not provide gpu information. | ||
| Fixed by [@atterpac](https://github.com/atterpac) in [3108](https://github.com/wailsapp/wails/pull/3108) |
There was a problem hiding this comment.
The changelog entry for the unreleased section is not following the standard format. It should be categorized under Fixed and use the markdown link syntax for the user and PR references.
## [Unreleased]
- Fix `wails doctor` segfault if device does not provide gpu information.
- Fixed by [@atterpac](https://github.com/atterpac) in [3108](https://github.com/wailsapp/wails/pull/3108)Should be:
## [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)).
Description
Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.
Fixes # (issue)
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
Test Configuration
`
Wails Doctor
Wails
Version | v2.7.0
Revision | f517c8b
Modified | true
Package Manager | apt
System
┌───────────────────────────────────────────────────┐
| OS | Ubuntu |
| Version | 22.04 |
| ID | ubuntu |
| Go Version | go1.21.1 |
| Platform | linux |
| Architecture | amd64 |
| CPU | AMD Ryzen 7 3700X 8-Core Processor |
| GPU | Unknown |
| Memory | 12GB |
└───────────────────────────────────────────────────┘
Dependencies
┌──────────────────────────────────────────────────────────────────────────┐
| Dependency | Package Name | Status | Version |
| *docker | docker.io | Installed | 24.0.5-0ubuntu1~22.04.1 |
| gcc | build-essential | Installed | 12.9ubuntu3 |
| libgtk-3 | libgtk-3-dev | Installed | 3.24.33-1ubuntu2 |
| libwebkit | libwebkit2gtk-4.0-dev | Installed | 2.42.2-0ubuntu0.22.04.1 |
| npm | npm | Installed | 9.8.1 |
| *nsis | nsis | Installed | v3.08-2 |
| pkg-config | pkg-config | Installed | 0.29.2-1ubuntu3 |
└──────────────────────── * - Optional Dependency ─────────────────────────┘
Diagnosis
SUCCESS Your system is ready for Wails development!
♥ If Wails is useful to you or your company, please consider sponsoring the project:
https://github.com/sponsors/leaanthony`
Summary by CodeRabbit
wails doctorwould crash if GPU device information was not available. (#3108)