Commit b6ba7f4f2860c82e8b303c129c4ac97e89aa1d5a

Thomas de Grivel 2023-04-12T00:43:33

do-resources

1
2
3
4
5
6
7
8
9
10
11
12
13
14
diff --git a/core/resource-container.lisp b/core/resource-container.lisp
index 0d5c5b9..cbc2891 100644
--- a/core/resource-container.lisp
+++ b/core/resource-container.lisp
@@ -60,7 +60,8 @@
        (loop (when (endp ,resources) (return))
           (let ((,var (pop ,resources)))
             (declare (type resource ,var))
-            ,@body)))))
+            (when ,var
+              ,@body))))))
 
 (defmethod print-object ((rc resource-container) stream)
   (print-unreadable-object (rc stream :type t :identity (not *print-pretty*))