diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 22b72f5..3e854a5 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -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 diff --git a/robotgo.go b/robotgo.go index 46c9905..ccaca7d 100644 --- a/robotgo.go +++ b/robotgo.go @@ -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)