Skip to content

Commit

Permalink
Ensure (setf find-pool) with NIL as pool removes the pool correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
Shinmera committed Sep 1, 2024
1 parent 2c6cc28 commit e537075
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion asset-pool.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@
(when errorp (error "No pool with name ~s." name))))

(defun (setf find-pool) (pool name)
(setf (gethash name *pools*) pool))
(if pool
(setf (gethash name *pools*) pool)
(remhash name *pools*))
pool)

(defun remove-pool (name)
(remhash name *pools*))
Expand Down

0 comments on commit e537075

Please sign in to comment.