run another check against the duplication api. Also fix mac building with CGO enabled.

This commit is contained in:
KingKDot
2026-05-07 20:16:02 -05:00
parent 1a0dc05222
commit dd6007fb74
3 changed files with 34 additions and 15 deletions
+4 -3
View File
@@ -304,9 +304,10 @@ func safeActiveDisplays() int {
}
func safeCaptureDisplay(display int) (*image.RGBA, error) {
defer func() {
_ = recover()
}()
// Log panics with a stack trace so the actual culprit is captured in the
// crash log instead of being silently swallowed (returns nil image, which
// the caller treats as a transient capture failure).
defer recoverAndLog("safeCaptureDisplay", nil)
img, err := captureDisplayFn(display)
if err != nil {
return nil, err