Monorepo for Aesthetic.Computer aesthetic.computer
4
fork

Configure Feed

Select the types of activity you want to include in your feed.

fix: guard unwind-protect cleanup against unbound variables

Initialize screen/graph/input/audio to nil before setf so they're
always bound even if init fails. Wrap cleanup in ignore-errors.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

+10 -10
+10 -10
fedac/native/cl/main.lisp
··· 342 342 (scale (compute-pixel-scale dw)) 343 343 (sw (floor dw scale)) 344 344 (sh (floor dh scale)) 345 - (screen (fb-create sw sh)) 346 - (graph (make-graph :fb screen :screen screen)) 347 - (input (ac-native.input:input-init dw dh scale)) 348 - (audio (ac-native.audio:audio-init)) 349 - (frame 0)) 345 + (screen nil) (graph nil) (input nil) (audio nil) (frame 0)) 346 + (setf screen (fb-create sw sh) 347 + graph (make-graph :fb screen :screen screen) 348 + input (ac-native.input:input-init dw dh scale) 349 + audio (ac-native.audio:audio-init)) 350 350 351 351 (format *error-output* "[notepat] ~Dx~D scale:~D → ~Dx~D~%" 352 352 dw dh scale sw sh) ··· 747 747 (frame-sync-60fps)) 748 748 749 749 ;; ── Cleanup ── 750 - (kill-all-voices audio) 751 - (when audio (audio-destroy audio)) 752 - (ac-native.input:input-destroy input) 753 - (fb-destroy screen) 754 - (ac-native.drm:drm-destroy display) 750 + (when audio (ignore-errors (kill-all-voices audio))) 751 + (when audio (ignore-errors (audio-destroy audio))) 752 + (when input (ignore-errors (ac-native.input:input-destroy input))) 753 + (when screen (ignore-errors (fb-destroy screen))) 754 + (ignore-errors (ac-native.drm:drm-destroy display)) 755 755 (format *error-output* "[notepat] shutdown~%") 756 756 (force-output *error-output*))))