diff options
-rw-r--r-- | wheelwork.lisp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/wheelwork.lisp b/wheelwork.lisp index 6dd8f64..9d7571d 100644 --- a/wheelwork.lisp +++ b/wheelwork.lisp @@ -63,9 +63,9 @@ (defmethod drop-unit ((unit unit)) "Removes a unit from its container. Returns T if the unit actually was removed." - (when (unit-container unit) + (when-let (container (unit-container unit)) (setf - (container-units (unit-container unit)) (delete unit (container-units (unit-container unit))) + (container-units container) (delete unit (container-units container)) (unit-container unit) nil) t)) |