Monorepo for Aesthetic.Computer aesthetic.computer
4
fork

Configure Feed

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

fix: segfault — painting finalizer was destroying runtime-owned buffers

JS_NewObjectClass(painting_class_id) for nopaint buffer/painting
meant GC would call fb_destroy() on runtime-owned framebuffers.
Now the finalizer skips buffers that match current_rt->nopaint_*.

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

+5 -1
+5 -1
fedac/native/src/js-bindings.c
··· 64 64 static void js_painting_finalizer(JSRuntime *rt, JSValue val) { 65 65 (void)rt; 66 66 ACFramebuffer *fb = JS_GetOpaque(val, painting_class_id); 67 - if (fb) fb_destroy(fb); 67 + if (!fb) return; 68 + // Don't destroy runtime-owned nopaint buffers 69 + if (current_rt && (fb == current_rt->nopaint_painting || fb == current_rt->nopaint_buffer)) 70 + return; 71 + fb_destroy(fb); 68 72 } 69 73 70 74 static JSClassDef painting_class_def = {