Skip to content

Commit 63937ec

Browse files
committed
see if avoiding double-finalizing fixes win32 access violation
1 parent cb3a621 commit 63937ec

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/SQLite.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ end
5454
DB() = DB(":memory:")
5555

5656
function _close(db::DB)
57-
sqlite3_close_v2(db.handle)
57+
db.handle == C_NULL || sqlite3_close_v2(db.handle)
5858
db.handle = C_NULL
5959
return
6060
end
@@ -78,7 +78,7 @@ type Stmt
7878
end
7979

8080
function _close(stmt::Stmt)
81-
sqlite3_finalize(stmt.handle)
81+
stmt.handle == C_NULL || sqlite3_finalize(stmt.handle)
8282
stmt.handle = C_NULL
8383
return
8484
end

0 commit comments

Comments
 (0)