Merge pull request #760 from go-vgo/bitmap-pr

Update: update CI and unsafe pointer
This commit is contained in:
Evans 2026-02-28 09:34:30 -08:00 committed by GitHub
commit e692133c3a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 3 additions and 3 deletions

View file

@ -10,10 +10,10 @@ jobs:
runs-on: ${{ matrix.os }}
steps:
- name: Set up Go 1.25.0
- name: Set up Go 1.26.0
uses: actions/setup-go@v6
with:
go-version: 1.25.x
go-version: 1.26.x
id: go
- name: Check out code into the Go module directory

View file

@ -372,7 +372,7 @@ func CaptureGo(args ...int) Bitmap {
// CaptureImg capture the screen and return image.Image, error
func CaptureImg(args ...int) (image.Image, error) {
bit := CaptureScreen(args...)
if bit == nil {
if unsafe.Pointer(bit) == nil {
return nil, errors.New("Capture image not found.")
}
defer FreeBitmap(bit)