Skip to content

Commit

Permalink
Prevent double disposing.
Browse files Browse the repository at this point in the history
  • Loading branch information
Shinmera committed Aug 24, 2016
1 parent 51dad52 commit 44e22ab
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions wrapper.lisp
Expand Up @@ -72,6 +72,9 @@
(cl-out123-cffi:param-string handle :name name)))))

(defmethod reinitialize-instance :around ((output output) &key)
;; Make sure that our finalizer cannot accidentally try to
;; dispose of an already disposed handle later...
(tg:cancel-finalization output)
(dispose-handle (handle output))
(call-next-method)
(when (connected output)
Expand Down

0 comments on commit 44e22ab

Please sign in to comment.