Skip to content

Commit

Permalink
Bugfix for close-memo.
Browse files Browse the repository at this point in the history
The memo slot might be unbound.
  • Loading branch information
dimitri committed Apr 14, 2019
1 parent 3f5fcff commit 13f380d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
7 changes: 4 additions & 3 deletions db3.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -271,9 +271,10 @@ More information, from
record))

(defmethod close-memo ((db3 db3))
(let ((s (db3-memo-stream (memo db3))))
(when (and s (open-stream-p s))
(close s))))
(let ((s (when (slot-boundp db3 'memo)
(db3-memo-stream (memo db3)))))
(when (and s (open-stream-p s))
(close s))))


(defmethod convert-field (db3 type data)
Expand Down
1 change: 1 addition & 0 deletions package.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
(:export #:*external-format*
#:db3 ; the main class
#:load-header
#:close-memo
#:record-count
#:load-record
#:write-record
Expand Down

0 comments on commit 13f380d

Please sign in to comment.