Update: update CI and unsafe pointer

This commit is contained in:
vcaesar 2026-02-28 09:27:36 -08:00
parent 59874c5cb5
commit ff16db828b
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)