🐛 Fix empty fills

This commit is contained in:
Alejandro Alonso 2025-06-23 11:14:58 +02:00
parent 34bbce5089
commit c97314ddb5

View file

@ -245,7 +245,8 @@
(defn set-shape-fills
[shape-id fills]
(when (not-empty? fills)
(if (empty? fills)
(h/call wasm/internal-module "_clear_shape_fills")
(let [fills (take types.fill/MAX-FILLS fills)
image-fills (filter :fill-image fills)
offset (mem/alloc-bytes (* (count fills) sr-fills/FILL-BYTE-SIZE))