mirror of
https://github.com/go-vgo/robotgo
synced 2026-05-23 17:59:12 +00:00
Merge pull request #760 from go-vgo/bitmap-pr
Update: update CI and unsafe pointer
This commit is contained in:
commit
e692133c3a
2 changed files with 3 additions and 3 deletions
4
.github/workflows/go.yml
vendored
4
.github/workflows/go.yml
vendored
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in a new issue